Hi Steve,
First test the hardware and KFLOP configuration by Jogging the Spindle Axis both directions from the KMotion.exe Console Screen with something like Jog3=10000 and Jog3=-10000. Does the axis move both ways?
Our Plugin receives a Message (command action code), Direction, and Speed info from Mach3 which it writes into KFLOP before launching the spindle C program in KFLOP. The Var parameter specifies which 3 consecutive UserData Variables in KFLOP the information will be placed. So for example Var is typically configured to be 0, so the 3 pieces of information are placed into Variables 0, 1, and 2. The Plugin Configuration and the way the C Program is written where to expect to find the data must match. Otherwise the C Program will use invalid data and things wont work at all.
I'm not sure what you mean by: "MACH3 set up with Step/Dir spindle" Since KFLOP handles all motion Mach3 doesn't need to know what type of Spindle is connected and how. It just sends logical commands of speed, on, off, direction and the Plugin+KFLOP is expected to make it happen.
If your C Program contains diagnostic printout messages you can look at the KMotion Console Screen to see exactly if/what messages, speeds, directions, KFLOP is receiving.
If you still have problems post your Mach3 XML file and Spindle C program so we can check it.
HTH Regards TK
Group: DynoMotion |
Message: 7367 |
From: Steve |
Date: 4/29/2013 |
Subject: Re: Mach3 servo spindle - no direction change |
Note: The spindle DOES run, so the step signal is present, and I am checking for a dir signal on the Spindle DIR wire from the Kflop.
I set up a step/dit spindle in the MACH config because the axis are configured within MACH.
By removing the spindle from MACHs configuration, the M3 and M4 macros now change direction.
However, M5 has no effect and the spindle starts as soon as a speed is entered and there is no way to shut it off except to enter a speed of zero.
This is entering commands via MACHs MDI interface.
It does not appear that ON/Off are being send or received. The spindle is locked ON at all times and responds only to speed (and now to direction via M3 and M4)
--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Steve,
>
> First test the hardware and KFLOP configuration by Jogging the Spindle Axis both directions from the KMotion.exe Console Screen with something like Jog3=10000 and Jog3=-10000. Does the axis move both ways?
>
> Our Plugin receives a Message (command action code), Direction, and Speed info from Mach3 which it writes into KFLOP before launching the spindle C program in KFLOP. The Var parameter specifies which 3 consecutive UserData Variables in KFLOP the information will be placed. So for example Var is typically configured to be 0, so the 3 pieces of information are placed into Variables 0, 1, and 2. The Plugin Configuration and the way the C Program is written where to expect to find the data must match. Otherwise the C Program will use invalid data and things wont work at all.
>
> I'm not sure what you mean by: "MACH3 set up with Step/Dir spindle" Since KFLOP handles all motion Mach3 doesn't need to know what type of Spindle is connected and how. It just sends logical commands of speed, on, off, direction and the Plugin+KFLOP is expected to make it happen.
>
> If your C Program contains diagnostic printout messages you can look at the KMotion Console Screen to see exactly if/what messages, speeds, directions, KFLOP is receiving.
>
> If you still have problems post your Mach3 XML file and Spindle C program so we can check it.
>
>
> HTH
> Regards
> TK
>
>
>
> ________________________________
> From: Steve <steve@...>
> To: DynoMotion@yahoogroups.com
> Sent: Monday, April 29, 2013 4:09 AM
> Subject: [DynoMotion] Mach3 servo spindle - no direction change
>
>
>
> Â
> Using example SpindleMach3Jog.c with MACH3/KFLOP
>
> MACH3 set up with Step/Dir spindle
>
> Spindle motor runs, but there is no direction change. Testing the Kflop default spindle dir pin (hardware) shows it to be functional, but there is no dir change signal coming off the pin.
>
> Documentation and forum search do not have an answer that I can find.
>
> The plug-in config has a setting for 0=msg 1=dir 2=speed. Any setting other then 0 leaves spindle inoperative. What is the purpose of this setting? Is there any documentation?
>
> Thanks,
>
> -Steve
>
|
|
Group: DynoMotion |
Message: 7371 |
From: Tom Kerekes |
Date: 4/29/2013 |
Subject: Re: Mach3 servo spindle - no direction change |
Hi Steve,
I think that the Mach3 option "Disable Spindle Relays" needs to be un-checked. Otherwise Mach3 doesn't send Spindle off to the Plugin for some reason.
Regards TK
Group: DynoMotion |
Message: 7375 |
From: Steve |
Date: 4/29/2013 |
Subject: Re: Mach3 servo spindle - no direction change |
Tried checked and uncheched. No joy. Tried standard MACH screens; no joy.
Tried the production version of the plugin; same behavior.
ON/OFF commands are either not getting to the plugin, or are in the wrong format perhaps?
If it matters, I am running 6 axis plus the spindle. The spindle axis (axis 6) is set up in the init file like all of the other axis.
responds to speed changes and sporatically to M3 and M4 . . never responds to M5, which simply contains DoSpinStop()
- Steve
--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Steve,
>
> I think that the Mach3 option "Disable Spindle Relays" needs to be un-checked.  Otherwise Mach3 doesn't send Spindle off to the Plugin for some reason.
>
> Regards
> TK
>
>
>
> ________________________________
> From: Steve <steve@...>
> To: DynoMotion@yahoogroups.com
> Sent: Monday, April 29, 2013 11:21 AM
> Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
>
>
>
> Â
> Note: The spindle DOES run, so the step signal is present, and I am checking for a dir signal on the Spindle DIR wire from the Kflop.
>
> I set up a step/dit spindle in the MACH config because the axis are configured within MACH.
>
> By removing the spindle from MACHs configuration, the M3 and M4 macros now change direction.
>
> However, M5 has no effect and the spindle starts as soon as a speed is entered and there is no way to shut it off except to enter a speed of zero.
>
> This is entering commands via MACHs MDI interface.
>
> It does not appear that ON/Off are being send or received. The spindle is locked ON at all times and responds only to speed (and now to direction via M3 and M4)
>
> --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> >
> > Hi Steve,
> >
> > First test the hardware and KFLOP configuration by Jogging the Spindle Axis both directions from the KMotion.exe Console Screen with something like Jog3=10000 and Jog3=-10000.ÃÂ Does the axis move both ways?
> >
> > Our Plugin receives a Message (command action code), Direction, and Speed info from Mach3 which it writes into KFLOP before launching the spindle C program in KFLOP.ÃÂ The Var parameter specifies which 3 consecutive UserData Variables in KFLOP the information will be placed.ÃÂ So for example Var is typically configured to be 0, so the 3 pieces of information are placed into Variables 0, 1, and 2.ÃÂ The Plugin Configuration and the way the C Program is written where to expect to find the data must match.ÃÂ Otherwise the C Program will use invalid data and things wont work at all.
> >
> > I'm not sure what you mean by:ÃÂ "MACH3 set up with Step/Dir spindle"ÃÂ Since KFLOP handles all motion Mach3 doesn't need to know what type of Spindle is connected and how.ÃÂ It just sends logical commands of speed, on, off, direction and the Plugin+KFLOP is expected to make it happen.
> >
> > If your C Program contains diagnostic printout messages you can look at the KMotion Console Screen to see exactly if/what messages, speeds, directions, KFLOP is receiving.
> >
> > If you still have problems post your Mach3 XML file and Spindle C program so we can check it.
> >
> >
> > HTH
> > Regards
> > TK
> >
> >
> >
> > ________________________________
> > From: Steve <steve@>
> > To: DynoMotion@yahoogroups.com
> > Sent: Monday, April 29, 2013 4:09 AM
> > Subject: [DynoMotion] Mach3 servo spindle - no direction change
> >
> >
> >
> > ÃÂ
> > Using example SpindleMach3Jog.c with MACH3/KFLOP
> >
> > MACH3 set up with Step/Dir spindle
> >
> > Spindle motor runs, but there is no direction change. Testing the Kflop default spindle dir pin (hardware) shows it to be functional, but there is no dir change signal coming off the pin.
> >
> > Documentation and forum search do not have an answer that I can find.
> >
> > The plug-in config has a setting for 0=msg 1=dir 2=speed. Any setting other then 0 leaves spindle inoperative. What is the purpose of this setting? Is there any documentation?
> >
> > Thanks,
> >
> > -Steve
> >
>
|
|
Group: DynoMotion |
Message: 7376 |
From: Tom Kerekes |
Date: 4/29/2013 |
Subject: Re: Mach3 servo spindle - no direction change |
Hi Steve,
Please perform the tests described in the previous email. The idea of testing from the KMotion Console is not to test if the Spindle Runs, but rather if the direction changes properly and reliably.
If that works reliably use the KMotion Console to check if the Mach3 messages are getting to KFLOP properly. You will need to report back to us: What you commanded in Mach3, what was printed in the Console, and what happened. It would also be helpful to look at the Digital IO Screen to see if your Dir Bit is high or low in each step.
If you still can't figure it out attach the Spindle Mach3 C Program, your Init C Program, and your Mach3 XML file (with the standard screen set selected) so we can check them.
Regards TK
Group: DynoMotion |
Message: 7377 |
From: Steve |
Date: 4/29/2013 |
Subject: Re: Mach3 servo spindle - no direction change |
I mentioned in the OP that the pin functions normally, but if you need specifics, then yes the pin goes high and low when the box is checked in the digital I/O screen, the jog3 test that you asked for works fine, and as I also said, the direction is changing now, although not reliably. I have already done all of that.
In fact I have a work around wherein I added an output to MACH and puta call in the M3 and M4 macros to toggle the output. I am using that output to change dir on the drive.
This is a MACH spindle problem and the remaining issue is that the spindle does not turn ON and OFF, which I believe is a different problem from the dir change. I have not been able to figure out a work around for the ON/OFF problem.
I can see that the C programs are printing, but there is never any message on the MACH screen, so I will assume it is printing to the console and take a peek to see if there are any clues and let you know.
- Steve
--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Steve,
>
> Please perform the tests described in the previous email. The idea of testing from the KMotion Console is not to test if the Spindle Runs, but rather if the direction changes properly and reliably.
>
> If that works reliably use the KMotion Console to check if the Mach3 messages are getting to KFLOP properly. You will need to report back to us: What you commanded in Mach3, what was printed in the Console, and what happened. It would also be helpful to look at the Digital IO Screen to see if your Dir Bit is high or low in each step.
>
> If you still can't figure it out attach the Spindle Mach3 C Program, your Init C Program, and your Mach3 XML file (with the standard screen set selected) so we can check them.
>
> Regards
> TK
>
>
>
>
>
> ________________________________
> From: Steve <steve@...>
> To: DynoMotion@yahoogroups.com
> Sent: Monday, April 29, 2013 1:16 PM
> Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
>
>
>
> Â
> Tried checked and uncheched. No joy. Tried standard MACH screens; no joy.
>
> Tried the production version of the plugin; same behavior.
>
> ON/OFF commands are either not getting to the plugin, or are in the wrong format perhaps?
>
> If it matters, I am running 6 axis plus the spindle. The spindle axis (axis 6) is set up in the init file like all of the other axis.
>
> responds to speed changes and sporatically to M3 and M4 . . never responds to M5, which simply contains DoSpinStop()
>
> - Steve
>
> --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> >
> > Hi Steve,
> >
> > I think that the Mach3 option "Disable Spindle Relays" needs to be un-checked.ÃÂ ÃÂ Otherwise Mach3 doesn't send Spindle off to the Plugin for some reason.
> >
> > Regards
> > TK
> >
> >
> >
> > ________________________________
> > From: Steve <steve@>
> > To: DynoMotion@yahoogroups.com
> > Sent: Monday, April 29, 2013 11:21 AM
> > Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
> >
> >
> >
> > ÃÂ
> > Note: The spindle DOES run, so the step signal is present, and I am checking for a dir signal on the Spindle DIR wire from the Kflop.
> >
> > I set up a step/dit spindle in the MACH config because the axis are configured within MACH.
> >
> > By removing the spindle from MACHs configuration, the M3 and M4 macros now change direction.
> >
> > However, M5 has no effect and the spindle starts as soon as a speed is entered and there is no way to shut it off except to enter a speed of zero.
> >
> > This is entering commands via MACHs MDI interface.
> >
> > It does not appear that ON/Off are being send or received. The spindle is locked ON at all times and responds only to speed (and now to direction via M3 and M4)
> >
> > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > >
> > > Hi Steve,
> > >
> > > First test the hardware and KFLOP configuration by Jogging the Spindle Axis both directions from the KMotion.exe Console Screen with something like Jog3=10000 and Jog3=-10000.ÃâàDoes the axis move both ways?
> > >
> > > Our Plugin receives a Message (command action code), Direction, and Speed info from Mach3 which it writes into KFLOP before launching the spindle C program in KFLOP.ÃâàThe Var parameter specifies which 3 consecutive UserData Variables in KFLOP the information will be placed.ÃâàSo for example Var is typically configured to be 0, so the 3 pieces of information are placed into Variables 0, 1, and 2.ÃâàThe Plugin Configuration and the way the C Program is written where to expect to find the data must match.ÃâàOtherwise the C Program will use invalid data and things wont work at all.
> > >
> > > I'm not sure what you mean by:Ãâà"MACH3 set up with Step/Dir spindle"ÃâàSince KFLOP handles all motion Mach3 doesn't need to know what type of Spindle is connected and how.ÃâàIt just sends logical commands of speed, on, off, direction and the Plugin+KFLOP is expected to make it happen.
> > >
> > > If your C Program contains diagnostic printout messages you can look at the KMotion Console Screen to see exactly if/what messages, speeds, directions, KFLOP is receiving.
> > >
> > > If you still have problems post your Mach3 XML file and Spindle C program so we can check it.
> > >
> > >
> > > HTH
> > > Regards
> > > TK
> > >
> > >
> > >
> > > ________________________________
> > > From: Steve <steve@>
> > > To: DynoMotion@yahoogroups.com
> > > Sent: Monday, April 29, 2013 4:09 AM
> > > Subject: [DynoMotion] Mach3 servo spindle - no direction change
> > >
> > >
> > >
> > > ÃâÃÂ
> > > Using example SpindleMach3Jog.c with MACH3/KFLOP
> > >
> > > MACH3 set up with Step/Dir spindle
> > >
> > > Spindle motor runs, but there is no direction change. Testing the Kflop default spindle dir pin (hardware) shows it to be functional, but there is no dir change signal coming off the pin.
> > >
> > > Documentation and forum search do not have an answer that I can find.
> > >
> > > The plug-in config has a setting for 0=msg 1=dir 2=speed. Any setting other then 0 leaves spindle inoperative. What is the purpose of this setting? Is there any documentation?
> > >
> > > Thanks,
> > >
> > > -Steve
> > >
> >
>
|
|
Group: DynoMotion |
Message: 7378 |
From: Tom Kerekes |
Date: 4/29/2013 |
Subject: Re: Mach3 servo spindle - no direction change |
Hi Steve,
Thanks. Having a working hardware output pin and having KFLOP Configured to use a Step/Dir Generator to use that pin in the TTL or Open collector modes are two different things is the reason we asked. It also wasn't clear if that was working reliably. But now it is clear.
You of course should not need to change the M3 M4 macros to change the direction. So it would probably be best to remove that and find the real issue.
Please check the Console in the manner I described and also post the requested files.
Regards TK
Group: DynoMotion |
Message: 7379 |
From: Steve |
Date: 4/29/2013 |
Subject: Re: Mach3 servo spindle - no direction change |
My M3 and M4 'hacks' are work arounds so that the machine can do useful work. I switched over to a new computer with the Kflop on a machine that has to make parts for a living, so I can only do testing between runs. I will remove the 'hacks' and the patched in dir pin when we resolve the problem with the plug-in.
FWIW, the new computer is all Intel (except the memory sticks). Intel processor, Intel Motherboard, and Intel SSD. Fresh install Win7 Pro 32 bit. There is nothing on this computer except Windows and MACH3. No antivirus, etc. nothing.
TESTING RESULTS:
Typed into MACH's screen 2 manual input line, M3 and M4 result in the following messages on the concole:
Mach3 Notify Message 3, Direction = 1, Spindle set to xxxxxx
Spindle CCW ON
- and -
Mach3 Notify Message 3, Direction = 0, Spindle set to xxxxxx
Spindle CW ON
Speed command 'Sxxxx' results in:
Mach3 Notify Message 5, Direction = x, Spindle set to xxxxxx
Spindle Speed Set To xxxxxxx
In each of the above cases, there is an expected actual result; a direction change or speed change.
Entry of M5 has no result. No message. ZIP. NADA. and of course no actual result.
As I surmised, M5 is either not being sent by MACH, or the plug-in is not recognising it.
= Steve
--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Steve,
>
> Thanks. Having a working hardware output pin and having KFLOP Configured to use a Step/Dir Generator to use that pin in the TTL or Open collector modes are two different things is the reason we asked. It also wasn't clear if that was working reliably. But now it is clear.
>
> You of course should not need to change the M3 M4 macros to change the direction. So it would probably be best to remove that and find the real issue.
>
> Please check the Console in the manner I described and also post the requested files.
>
> Regards
> TK
>
>
>
> ________________________________
> From: Steve <steve@...>
> To: DynoMotion@yahoogroups.com
> Sent: Monday, April 29, 2013 3:42 PM
> Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
>
>
>
> Â
> I mentioned in the OP that the pin functions normally, but if you need specifics, then yes the pin goes high and low when the box is checked in the digital I/O screen, the jog3 test that you asked for works fine, and as I also said, the direction is changing now, although not reliably. I have already done all of that.
>
> In fact I have a work around wherein I added an output to MACH and puta call in the M3 and M4 macros to toggle the output. I am using that output to change dir on the drive.
> This is a MACH spindle problem and the remaining issue is that the spindle does not turn ON and OFF, which I believe is a different problem from the dir change. I have not been able to figure out a work around for the ON/OFF problem.
>
> I can see that the C programs are printing, but there is never any message on the MACH screen, so I will assume it is printing to the console and take a peek to see if there are any clues and let you know.
>
> - Steve
>
> --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> >
> > Hi Steve,
> >
> > Please perform the tests described in the previous email.ÃÂ The idea of testing from the KMotion Console is not to test if the Spindle Runs, but rather if the direction changes properly and reliably.
> >
> > If that works reliably use the KMotion Console to check if the Mach3 messages are getting to KFLOP properly.ÃÂ You will need to report back to us: What you commanded in Mach3, what was printed in the Console, and what happened.ÃÂ It would also be helpful to look at the Digital IO Screen to see if your Dir Bit is high or low in each step.
> >
> > If you still can't figure it out attach the Spindle Mach3 C Program, your Init C Program, and your Mach3 XML file (with the standard screen set selected) so we can check them.
> >
> > Regards
> > TK
> >
> >
> >
> >
> >
> > ________________________________
> > From: Steve <steve@>
> > To: DynoMotion@yahoogroups.com
> > Sent: Monday, April 29, 2013 1:16 PM
> > Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
> >
> >
> >
> > ÃÂ
> > Tried checked and uncheched. No joy. Tried standard MACH screens; no joy.
> >
> > Tried the production version of the plugin; same behavior.
> >
> > ON/OFF commands are either not getting to the plugin, or are in the wrong format perhaps?
> >
> > If it matters, I am running 6 axis plus the spindle. The spindle axis (axis 6) is set up in the init file like all of the other axis.
> >
> > responds to speed changes and sporatically to M3 and M4 . . never responds to M5, which simply contains DoSpinStop()
> >
> > - Steve
> >
> > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > >
> > > Hi Steve,
> > >
> > > I think that the Mach3 option "Disable Spindle Relays" needs to be un-checked.ÃâàÃâàOtherwise Mach3 doesn't send Spindle off to the Plugin for some reason.
> > >
> > > Regards
> > > TK
> > >
> > >
> > >
> > > ________________________________
> > > From: Steve <steve@>
> > > To: DynoMotion@yahoogroups.com
> > > Sent: Monday, April 29, 2013 11:21 AM
> > > Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
> > >
> > >
> > >
> > > ÃâÃÂ
> > > Note: The spindle DOES run, so the step signal is present, and I am checking for a dir signal on the Spindle DIR wire from the Kflop.
> > >
> > > I set up a step/dit spindle in the MACH config because the axis are configured within MACH.
> > >
> > > By removing the spindle from MACHs configuration, the M3 and M4 macros now change direction.
> > >
> > > However, M5 has no effect and the spindle starts as soon as a speed is entered and there is no way to shut it off except to enter a speed of zero.
> > >
> > > This is entering commands via MACHs MDI interface.
> > >
> > > It does not appear that ON/Off are being send or received. The spindle is locked ON at all times and responds only to speed (and now to direction via M3 and M4)
> > >
> > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > >
> > > > Hi Steve,
> > > >
> > > > First test the hardware and KFLOP configuration by Jogging the Spindle Axis both directions from the KMotion.exe Console Screen with something like Jog3=10000 and Jog3=-10000.ÃÆ'ââ¬Å¡ÃâàDoes the axis move both ways?
> > > >
> > > > Our Plugin receives a Message (command action code), Direction, and Speed info from Mach3 which it writes into KFLOP before launching the spindle C program in KFLOP.ÃÆ'ââ¬Å¡ÃâàThe Var parameter specifies which 3 consecutive UserData Variables in KFLOP the information will be placed.ÃÆ'ââ¬Å¡ÃâàSo for example Var is typically configured to be 0, so the 3 pieces of information are placed into Variables 0, 1, and 2.ÃÆ'ââ¬Å¡ÃâàThe Plugin Configuration and the way the C Program is written where to expect to find the data must match.ÃÆ'ââ¬Å¡ÃâàOtherwise the C Program will use invalid data and things wont work at all.
> > > >
> > > > I'm not sure what you mean by:ÃÆ'ââ¬Å¡Ãâà"MACH3 set up with Step/Dir spindle"ÃÆ'ââ¬Å¡ÃâàSince KFLOP handles all motion Mach3 doesn't need to know what type of Spindle is connected and how.ÃÆ'ââ¬Å¡ÃâàIt just sends logical commands of speed, on, off, direction and the Plugin+KFLOP is expected to make it happen.
> > > >
> > > > If your C Program contains diagnostic printout messages you can look at the KMotion Console Screen to see exactly if/what messages, speeds, directions, KFLOP is receiving.
> > > >
> > > > If you still have problems post your Mach3 XML file and Spindle C program so we can check it.
> > > >
> > > >
> > > > HTH
> > > > Regards
> > > > TK
> > > >
> > > >
> > > >
> > > > ________________________________
> > > > From: Steve <steve@>
> > > > To: DynoMotion@yahoogroups.com
> > > > Sent: Monday, April 29, 2013 4:09 AM
> > > > Subject: [DynoMotion] Mach3 servo spindle - no direction change
> > > >
> > > >
> > > >
> > > > ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > Using example SpindleMach3Jog.c with MACH3/KFLOP
> > > >
> > > > MACH3 set up with Step/Dir spindle
> > > >
> > > > Spindle motor runs, but there is no direction change. Testing the Kflop default spindle dir pin (hardware) shows it to be functional, but there is no dir change signal coming off the pin.
> > > >
> > > > Documentation and forum search do not have an answer that I can find.
> > > >
> > > > The plug-in config has a setting for 0=msg 1=dir 2=speed. Any setting other then 0 leaves spindle inoperative. What is the purpose of this setting? Is there any documentation?
> > > >
> > > > Thanks,
> > > >
> > > > -Steve
> > > >
> > >
> >
>
|
|
Group: DynoMotion |
Message: 7381 |
From: Tom Kerekes |
Date: 4/29/2013 |
Subject: Re: Mach3 servo spindle - no direction change |
Hi Steve, You can of course do whatever you wish when you are not trying to troubleshoot problems, but it would be less confusing if the "hacks" were removed when testing. Were the hacks removed when you performed the tests? Strange. Having M5 send no message is the exact behavior when Disable Spindle Relays is checked. You might double check that. Please send the requested files. Regards TK
Group: DynoMotion |
Message: 7384 |
From: Steve |
Date: 4/30/2013 |
Subject: Re: Mach3 servo spindle - no direction change |
I clarified the work-arounds (aka 'hacks') because you asked about them. They have no effect on the issue in any case, but to answer your question; for testing, everything is box-stock. No mods, work-arounds, custom screens or anything non-standard at all.
Only the Kflop device is 'new' to me. I am not a novice and I understand establishing a base-line.
I seem to have everything working now including my custom screen buttons that control the spindle. The solution for my application was to make changes to the spindle jog program.
What I think is a significant problem in the sample program is the unconditional start of the spindle with a speed change input. If the speed command ('Sxxx')comes befor the Spindle ON command (M4, M3)the net result is an unexpected spindle start which is potentially very dangerous. Just my 2 cents worth. Take it as you like.
I have solved this by making the Speed changing 'jog' conditional on the spindle being ON at the time of the speed change. If the spindle is OFF, a speed change updates the parameter but does not start the spindle.
Thanks very much for the prompt replies and suggestions.
- Steve
--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Steve,
>
> You can of course do whatever you wish when you are not trying to troubleshoot problems, but it would be less confusing if the "hacks" were removed when testing. Were the hacks removed when you performed the tests?
>
> Strange. Having M5 send no message is the exact behavior when Disable Spindle Relays is checked. You might double check that.
>
> Please send the requested files.
>
> Regards
> TK
>
>
>
>
> ________________________________
> From: Steve <steve@...>
> To: DynoMotion@yahoogroups.com
> Sent: Monday, April 29, 2013 7:38 PM
> Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
>
>
>
> Â
> My M3 and M4 'hacks' are work arounds so that the machine can do useful work. I switched over to a new computer with the Kflop on a machine that has to make parts for a living, so I can only do testing between runs. I will remove the 'hacks' and the patched in dir pin when we resolve the problem with the plug-in.
>
> FWIW, the new computer is all Intel (except the memory sticks). Intel processor, Intel Motherboard, and Intel SSD. Fresh install Win7 Pro 32 bit. There is nothing on this computer except Windows and MACH3. No antivirus, etc. nothing.
>
> TESTING RESULTS:
>
> Typed into MACH's screen 2 manual input line, M3 and M4 result in the following messages on the concole:
>
> Mach3 Notify Message 3, Direction = 1, Spindle set to xxxxxx
> Spindle CCW ON
> - and -
> Mach3 Notify Message 3, Direction = 0, Spindle set to xxxxxx
> Spindle CW ON
>
> Speed command 'Sxxxx' results in:
> Mach3 Notify Message 5, Direction = x, Spindle set to xxxxxx
> Spindle Speed Set To xxxxxxx
>
> In each of the above cases, there is an expected actual result; a direction change or speed change.
>
> Entry of M5 has no result. No message. ZIP. NADA. and of course no actual result.
>
> As I surmised, M5 is either not being sent by MACH, or the plug-in is not recognising it.
>
> = Steve
>
> --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> >
> > Hi Steve,
> >
> > Thanks.ÃÂ Having a working hardware output pin and having KFLOP Configured to use a Step/Dir Generator to use that pin in the TTL or Open collector modes are two different things is the reason we asked.ÃÂ It also wasn't clear if that was working reliably.ÃÂ But now it is clear.
> >
> > You of course should not need to change the M3 M4 macros to change the direction.ÃÂ So it would probably be best to remove that and find the real issue.
> >
> > Please check the Console in the manner I described and also post the requested files.
> >
> > Regards
> > TK
> >
> >
> >
> > ________________________________
> > From: Steve <steve@>
> > To: DynoMotion@yahoogroups.com
> > Sent: Monday, April 29, 2013 3:42 PM
> > Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
> >
> >
> >
> > ÃÂ
> > I mentioned in the OP that the pin functions normally, but if you need specifics, then yes the pin goes high and low when the box is checked in the digital I/O screen, the jog3 test that you asked for works fine, and as I also said, the direction is changing now, although not reliably. I have already done all of that.
> >
> > In fact I have a work around wherein I added an output to MACH and puta call in the M3 and M4 macros to toggle the output. I am using that output to change dir on the drive.
> > This is a MACH spindle problem and the remaining issue is that the spindle does not turn ON and OFF, which I believe is a different problem from the dir change. I have not been able to figure out a work around for the ON/OFF problem.
> >
> > I can see that the C programs are printing, but there is never any message on the MACH screen, so I will assume it is printing to the console and take a peek to see if there are any clues and let you know.
> >
> > - Steve
> >
> > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > >
> > > Hi Steve,
> > >
> > > Please perform the tests described in the previous email.ÃâàThe idea of testing from the KMotion Console is not to test if the Spindle Runs, but rather if the direction changes properly and reliably.
> > >
> > > If that works reliably use the KMotion Console to check if the Mach3 messages are getting to KFLOP properly.ÃâàYou will need to report back to us: What you commanded in Mach3, what was printed in the Console, and what happened.ÃâàIt would also be helpful to look at the Digital IO Screen to see if your Dir Bit is high or low in each step.
> > >
> > > If you still can't figure it out attach the Spindle Mach3 C Program, your Init C Program, and your Mach3 XML file (with the standard screen set selected) so we can check them.
> > >
> > > Regards
> > > TK
> > >
> > >
> > >
> > >
> > >
> > > ________________________________
> > > From: Steve <steve@>
> > > To: DynoMotion@yahoogroups.com
> > > Sent: Monday, April 29, 2013 1:16 PM
> > > Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
> > >
> > >
> > >
> > > ÃâÃÂ
> > > Tried checked and uncheched. No joy. Tried standard MACH screens; no joy.
> > >
> > > Tried the production version of the plugin; same behavior.
> > >
> > > ON/OFF commands are either not getting to the plugin, or are in the wrong format perhaps?
> > >
> > > If it matters, I am running 6 axis plus the spindle. The spindle axis (axis 6) is set up in the init file like all of the other axis.
> > >
> > > responds to speed changes and sporatically to M3 and M4 . . never responds to M5, which simply contains DoSpinStop()
> > >
> > > - Steve
> > >
> > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > >
> > > > Hi Steve,
> > > >
> > > > I think that the Mach3 option "Disable Spindle Relays" needs to be un-checked.ÃÆ'ââ¬Å¡ÃâàÃÆ'ââ¬Å¡ÃâàOtherwise Mach3 doesn't send Spindle off to the Plugin for some reason.
> > > >
> > > > Regards
> > > > TK
> > > >
> > > >
> > > >
> > > > ________________________________
> > > > From: Steve <steve@>
> > > > To: DynoMotion@yahoogroups.com
> > > > Sent: Monday, April 29, 2013 11:21 AM
> > > > Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
> > > >
> > > >
> > > >
> > > > ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > Note: The spindle DOES run, so the step signal is present, and I am checking for a dir signal on the Spindle DIR wire from the Kflop.
> > > >
> > > > I set up a step/dit spindle in the MACH config because the axis are configured within MACH.
> > > >
> > > > By removing the spindle from MACHs configuration, the M3 and M4 macros now change direction.
> > > >
> > > > However, M5 has no effect and the spindle starts as soon as a speed is entered and there is no way to shut it off except to enter a speed of zero.
> > > >
> > > > This is entering commands via MACHs MDI interface.
> > > >
> > > > It does not appear that ON/Off are being send or received. The spindle is locked ON at all times and responds only to speed (and now to direction via M3 and M4)
> > > >
> > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > >
> > > > > Hi Steve,
> > > > >
> > > > > First test the hardware and KFLOP configuration by Jogging the Spindle Axis both directions from the KMotion.exe Console Screen with something like Jog3=10000 and Jog3=-10000.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàDoes the axis move both ways?
> > > > >
> > > > > Our Plugin receives a Message (command action code), Direction, and Speed info from Mach3 which it writes into KFLOP before launching the spindle C program in KFLOP.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàThe Var parameter specifies which 3 consecutive UserData Variables in KFLOP the information will be placed.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàSo for example Var is typically configured to be 0, so the 3 pieces of information are placed into Variables 0, 1, and 2.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàThe Plugin Configuration and the way the C Program is written where to expect to find the data must match.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàOtherwise the C Program will use invalid data and things wont work at all.
> > > > >
> > > > > I'm not sure what you mean by:ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡Ãâà"MACH3 set up with Step/Dir spindle"ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàSince KFLOP handles all motion Mach3 doesn't need to know what type of Spindle is connected and how.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàIt just sends logical commands of speed, on, off, direction and the Plugin+KFLOP is expected to make it happen.
> > > > >
> > > > > If your C Program contains diagnostic printout messages you can look at the KMotion Console Screen to see exactly if/what messages, speeds, directions, KFLOP is receiving.
> > > > >
> > > > > If you still have problems post your Mach3 XML file and Spindle C program so we can check it.
> > > > >
> > > > >
> > > > > HTH
> > > > > Regards
> > > > > TK
> > > > >
> > > > >
> > > > >
> > > > > ________________________________
> > > > > From: Steve <steve@>
> > > > > To: DynoMotion@yahoogroups.com
> > > > > Sent: Monday, April 29, 2013 4:09 AM
> > > > > Subject: [DynoMotion] Mach3 servo spindle - no direction change
> > > > >
> > > > >
> > > > >
> > > > > ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > Using example SpindleMach3Jog.c with MACH3/KFLOP
> > > > >
> > > > > MACH3 set up with Step/Dir spindle
> > > > >
> > > > > Spindle motor runs, but there is no direction change. Testing the Kflop default spindle dir pin (hardware) shows it to be functional, but there is no dir change signal coming off the pin.
> > > > >
> > > > > Documentation and forum search do not have an answer that I can find.
> > > > >
> > > > > The plug-in config has a setting for 0=msg 1=dir 2=speed. Any setting other then 0 leaves spindle inoperative. What is the purpose of this setting? Is there any documentation?
> > > > >
> > > > > Thanks,
> > > > >
> > > > > -Steve
> > > > >
> > > >
> > >
> >
>
|
|
Group: DynoMotion |
Message: 7386 |
From: Tom Kerekes |
Date: 4/30/2013 |
Subject: Re: Mach3 servo spindle - no direction change |
Hi Steve, Could you post your Spindle Program with the bug fixed. It would help solve a problem Tapio is having. Thanks TK
Group: DynoMotion |
Message: 7420 |
From: Steve |
Date: 5/3/2013 |
Subject: Re: Mach3 servo spindle - no direction change |
Tom,
I tried to post the program, but an error message was thrown up saying that the request could not be completed.
=Steve
--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Steve,
>
> Could you post your Spindle Program with the bug fixed. It would help solve a problem Tapio is having.
>
> Thanks
> TK
>
>
>
>
> ________________________________
> From: Steve <steve@...>
> To: DynoMotion@yahoogroups.com
> Sent: Tuesday, April 30, 2013 5:08 AM
> Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
>
>
>
> Â
>
>
> I clarified the work-arounds (aka 'hacks') because you asked about them. They have no effect on the issue in any case, but to answer your question; for testing, everything is box-stock. No mods, work-arounds, custom screens or anything non-standard at all.
>
> Only the Kflop device is 'new' to me. I am not a novice and I understand establishing a base-line.
>
> I seem to have everything working now including my custom screen buttons that control the spindle. The solution for my application was to make changes to the spindle jog program.
>
> What I think is a significant problem in the sample program is the unconditional start of the spindle with a speed change input. If the speed command ('Sxxx')comes befor the Spindle ON command (M4, M3)the net result is an unexpected spindle start which is potentially very dangerous. Just my 2 cents worth. Take it as you like.
>
> I have solved this by making the Speed changing 'jog' conditional on the spindle being ON at the time of the speed change. If the spindle is OFF, a speed change updates the parameter but does not start the spindle.
>
> Thanks very much for the prompt replies and suggestions.
>
> - Steve
>
> --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> >
> > Hi Steve,
> >
> > You can of course do whatever you wish when you are not trying to troubleshoot problems, but it would be less confusing if the "hacks" were removed when testing.ÃÂ Were the hacks removed when you performed the tests?
> >
> > Strange.ÃÂ Having M5 send no message is the exact behavior when Disable Spindle Relays is checked.ÃÂ You might double check that.
> >
> > Please send the requested files.
> >
> > Regards
> > TK
> >
> >
> >
> >
> > ________________________________
> > From: Steve <steve@>
> > To: DynoMotion@yahoogroups.com
> > Sent: Monday, April 29, 2013 7:38 PM
> > Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
> >
> >
> >
> > ÃÂ
> > My M3 and M4 'hacks' are work arounds so that the machine can do useful work. I switched over to a new computer with the Kflop on a machine that has to make parts for a living, so I can only do testing between runs. I will remove the 'hacks' and the patched in dir pin when we resolve the problem with the plug-in.
> >
> > FWIW, the new computer is all Intel (except the memory sticks). Intel processor, Intel Motherboard, and Intel SSD. Fresh install Win7 Pro 32 bit. There is nothing on this computer except Windows and MACH3. No antivirus, etc. nothing.
> >
> > TESTING RESULTS:
> >
> > Typed into MACH's screen 2 manual input line, M3 and M4 result in the following messages on the concole:
> >
> > Mach3 Notify Message 3, Direction = 1, Spindle set to xxxxxx
> > Spindle CCW ON
> > - and -
> > Mach3 Notify Message 3, Direction = 0, Spindle set to xxxxxx
> > Spindle CW ON
> >
> > Speed command 'Sxxxx' results in:
> > Mach3 Notify Message 5, Direction = x, Spindle set to xxxxxx
> > Spindle Speed Set To xxxxxxx
> >
> > In each of the above cases, there is an expected actual result; a direction change or speed change.
> >
> > Entry of M5 has no result. No message. ZIP. NADA. and of course no actual result.
> >
> > As I surmised, M5 is either not being sent by MACH, or the plug-in is not recognising it.
> >
> > = Steve
> >
> > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > >
> > > Hi Steve,
> > >
> > > Thanks.ÃâàHaving a working hardware output pin and having KFLOP Configured to use a Step/Dir Generator to use that pin in the TTL or Open collector modes are two different things is the reason we asked.ÃâàIt also wasn't clear if that was working reliably.ÃâàBut now it is clear.
> > >
> > > You of course should not need to change the M3 M4 macros to change the direction.ÃâàSo it would probably be best to remove that and find the real issue.
> > >
> > > Please check the Console in the manner I described and also post the requested files.
> > >
> > > Regards
> > > TK
> > >
> > >
> > >
> > > ________________________________
> > > From: Steve <steve@>
> > > To: DynoMotion@yahoogroups.com
> > > Sent: Monday, April 29, 2013 3:42 PM
> > > Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
> > >
> > >
> > >
> > > ÃâÃÂ
> > > I mentioned in the OP that the pin functions normally, but if you need specifics, then yes the pin goes high and low when the box is checked in the digital I/O screen, the jog3 test that you asked for works fine, and as I also said, the direction is changing now, although not reliably. I have already done all of that.
> > >
> > > In fact I have a work around wherein I added an output to MACH and puta call in the M3 and M4 macros to toggle the output. I am using that output to change dir on the drive.
> > > This is a MACH spindle problem and the remaining issue is that the spindle does not turn ON and OFF, which I believe is a different problem from the dir change. I have not been able to figure out a work around for the ON/OFF problem.
> > >
> > > I can see that the C programs are printing, but there is never any message on the MACH screen, so I will assume it is printing to the console and take a peek to see if there are any clues and let you know.
> > >
> > > - Steve
> > >
> > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > >
> > > > Hi Steve,
> > > >
> > > > Please perform the tests described in the previous email.ÃÆ'ââ¬Å¡ÃâàThe idea of testing from the KMotion Console is not to test if the Spindle Runs, but rather if the direction changes properly and reliably.
> > > >
> > > > If that works reliably use the KMotion Console to check if the Mach3 messages are getting to KFLOP properly.ÃÆ'ââ¬Å¡ÃâàYou will need to report back to us: What you commanded in Mach3, what was printed in the Console, and what happened.ÃÆ'ââ¬Å¡ÃâàIt would also be helpful to look at the Digital IO Screen to see if your Dir Bit is high or low in each step.
> > > >
> > > > If you still can't figure it out attach the Spindle Mach3 C Program, your Init C Program, and your Mach3 XML file (with the standard screen set selected) so we can check them.
> > > >
> > > > Regards
> > > > TK
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > ________________________________
> > > > From: Steve <steve@>
> > > > To: DynoMotion@yahoogroups.com
> > > > Sent: Monday, April 29, 2013 1:16 PM
> > > > Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
> > > >
> > > >
> > > >
> > > > ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > Tried checked and uncheched. No joy. Tried standard MACH screens; no joy.
> > > >
> > > > Tried the production version of the plugin; same behavior.
> > > >
> > > > ON/OFF commands are either not getting to the plugin, or are in the wrong format perhaps?
> > > >
> > > > If it matters, I am running 6 axis plus the spindle. The spindle axis (axis 6) is set up in the init file like all of the other axis.
> > > >
> > > > responds to speed changes and sporatically to M3 and M4 . . never responds to M5, which simply contains DoSpinStop()
> > > >
> > > > - Steve
> > > >
> > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > >
> > > > > Hi Steve,
> > > > >
> > > > > I think that the Mach3 option "Disable Spindle Relays" needs to be un-checked.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàOtherwise Mach3 doesn't send Spindle off to the Plugin for some reason.
> > > > >
> > > > > Regards
> > > > > TK
> > > > >
> > > > >
> > > > >
> > > > > ________________________________
> > > > > From: Steve <steve@>
> > > > > To: DynoMotion@yahoogroups.com
> > > > > Sent: Monday, April 29, 2013 11:21 AM
> > > > > Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
> > > > >
> > > > >
> > > > >
> > > > > ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > Note: The spindle DOES run, so the step signal is present, and I am checking for a dir signal on the Spindle DIR wire from the Kflop.
> > > > >
> > > > > I set up a step/dit spindle in the MACH config because the axis are configured within MACH.
> > > > >
> > > > > By removing the spindle from MACHs configuration, the M3 and M4 macros now change direction.
> > > > >
> > > > > However, M5 has no effect and the spindle starts as soon as a speed is entered and there is no way to shut it off except to enter a speed of zero.
> > > > >
> > > > > This is entering commands via MACHs MDI interface.
> > > > >
> > > > > It does not appear that ON/Off are being send or received. The spindle is locked ON at all times and responds only to speed (and now to direction via M3 and M4)
> > > > >
> > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > >
> > > > > > Hi Steve,
> > > > > >
> > > > > > First test the hardware and KFLOP configuration by Jogging the Spindle Axis both directions from the KMotion.exe Console Screen with something like Jog3=10000 and Jog3=-10000.ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàDoes the axis move both ways?
> > > > > >
> > > > > > Our Plugin receives a Message (command action code), Direction, and Speed info from Mach3 which it writes into KFLOP before launching the spindle C program in KFLOP.ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàThe Var parameter specifies which 3 consecutive UserData Variables in KFLOP the information will be placed.ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàSo for example Var is typically configured to be 0, so the 3 pieces of information are placed into Variables 0, 1, and 2.ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàThe Plugin Configuration and the way the C Program is written where to expect to find the data must match.ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàOtherwise the C Program will use invalid data and things wont work at all.
> > > > > >
> > > > > > I'm not sure what you mean by:ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡Ãâà"MACH3 set up with Step/Dir spindle"ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàSince KFLOP handles all motion Mach3 doesn't need to know what type of Spindle is connected and how.ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàIt just sends logical commands of speed, on, off, direction and the Plugin+KFLOP is expected to make it happen.
> > > > > >
> > > > > > If your C Program contains diagnostic printout messages you can look at the KMotion Console Screen to see exactly if/what messages, speeds, directions, KFLOP is receiving.
> > > > > >
> > > > > > If you still have problems post your Mach3 XML file and Spindle C program so we can check it.
> > > > > >
> > > > > >
> > > > > > HTH
> > > > > > Regards
> > > > > > TK
> > > > > >
> > > > > >
> > > > > >
> > > > > > ________________________________
> > > > > > From: Steve <steve@>
> > > > > > To: DynoMotion@yahoogroups.com
> > > > > > Sent: Monday, April 29, 2013 4:09 AM
> > > > > > Subject: [DynoMotion] Mach3 servo spindle - no direction change
> > > > > >
> > > > > >
> > > > > >
> > > > > > ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > Using example SpindleMach3Jog.c with MACH3/KFLOP
> > > > > >
> > > > > > MACH3 set up with Step/Dir spindle
> > > > > >
> > > > > > Spindle motor runs, but there is no direction change. Testing the Kflop default spindle dir pin (hardware) shows it to be functional, but there is no dir change signal coming off the pin.
> > > > > >
> > > > > > Documentation and forum search do not have an answer that I can find.
> > > > > >
> > > > > > The plug-in config has a setting for 0=msg 1=dir 2=speed. Any setting other then 0 leaves spindle inoperative. What is the purpose of this setting? Is there any documentation?
> > > > > >
> > > > > > Thanks,
> > > > > >
> > > > > > -Steve
> > > > > >
> > > > >
> > > >
> > >
> >
>
|
|
Group: DynoMotion |
Message: 7430 |
From: Tom Kerekes |
Date: 5/3/2013 |
Subject: Re: Mach3 servo spindle - no direction change |
Hi Steve,
Please email it to me and I'll upload it.
Thanks TK
Group: DynoMotion |
Message: 7431 |
From: Steve |
Date: 5/4/2013 |
Subject: Re: Mach3 servo spindle - no direction change |
I'm told that my use of the 'new' rich text editor (to highlight the progtram changes) may have caused the error. At the bottom of this post is a link to the program with the lines that I added or changed highlighted in red. I don't know much about Yahoo, but hopefully the link will work.
The fundamental change is approach is to track the state of the spindle and only do a 'live' speed change iof the spindle is alrady running.
Spindle ON commands (M3 M4) have separate instruction strings.
There may be an elegant way to determine the spindle state, but absent a programmers reference, the down and dirty solutionwas to create a volatile variable and update it locally on each stae change. The variable ('SpindleIsRunning')is then used to condition the response to a speed change command.
Use my example to add the lines to the SpindleMach3Jog.c sample file that comes with the Kflop. Make sure you enter channel/axis number and other params that are correct for your system.
Rename it to something specific to your setup to keep the original example fiel intact and enter the new file name in the plug-in configuration.
I have a custom speed 'slider' control on my screen along with buttons for cw, ccw and spindle stop. All are working properly with the modified program in the link above. G-code also works correctly.
http://www.thecubestudio.com/Kflop/SpindleMach3JogSimpson.htm
- Steve
--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Steve,
>
> Please email it to me and I'll upload it.
>
> Thanks
> TK
>
>
>
> ________________________________
> From: Steve <steve@...>
> To: DynoMotion@yahoogroups.com
> Sent: Friday, May 3, 2013 12:27 AM
> Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
>
>
>
> Â
> Tom,
>
> I tried to post the program, but an error message was thrown up saying that the request could not be completed.
>
> =Steve
>
> --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> >
> > Hi Steve,
> >
> > Could you post your Spindle Program with the bug fixed.ÃÂ It would help solve a problem Tapio is having.
> >
> > Thanks
> > TK
> >
> >
> >
> >
> > ________________________________
> > From: Steve <steve@>
> > To: DynoMotion@yahoogroups.com
> > Sent: Tuesday, April 30, 2013 5:08 AM
> > Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
> >
> >
> >
> > ÃÂ
> >
> >
> > I clarified the work-arounds (aka 'hacks') because you asked about them. They have no effect on the issue in any case, but to answer your question; for testing, everything is box-stock. No mods, work-arounds, custom screens or anything non-standard at all.
> >
> > Only the Kflop device is 'new' to me. I am not a novice and I understand establishing a base-line.
> >
> > I seem to have everything working now including my custom screen buttons that control the spindle. The solution for my application was to make changes to the spindle jog program.
> >
> > What I think is a significant problem in the sample program is the unconditional start of the spindle with a speed change input. If the speed command ('Sxxx')comes befor the Spindle ON command (M4, M3)the net result is an unexpected spindle start which is potentially very dangerous. Just my 2 cents worth. Take it as you like.
> >
> > I have solved this by making the Speed changing 'jog' conditional on the spindle being ON at the time of the speed change. If the spindle is OFF, a speed change updates the parameter but does not start the spindle.
> >
> > Thanks very much for the prompt replies and suggestions.
> >
> > - Steve
> >
> > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > >
> > > Hi Steve,
> > >
> > > You can of course do whatever you wish when you are not trying to troubleshoot problems, but it would be less confusing if the "hacks" were removed when testing.ÃâàWere the hacks removed when you performed the tests?
> > >
> > > Strange.ÃâàHaving M5 send no message is the exact behavior when Disable Spindle Relays is checked.ÃâàYou might double check that.
> > >
> > > Please send the requested files.
> > >
> > > Regards
> > > TK
> > >
> > >
> > >
> > >
> > > ________________________________
> > > From: Steve <steve@>
> > > To: DynoMotion@yahoogroups.com
> > > Sent: Monday, April 29, 2013 7:38 PM
> > > Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
> > >
> > >
> > >
> > > ÃâÃÂ
> > > My M3 and M4 'hacks' are work arounds so that the machine can do useful work. I switched over to a new computer with the Kflop on a machine that has to make parts for a living, so I can only do testing between runs. I will remove the 'hacks' and the patched in dir pin when we resolve the problem with the plug-in.
> > >
> > > FWIW, the new computer is all Intel (except the memory sticks). Intel processor, Intel Motherboard, and Intel SSD. Fresh install Win7 Pro 32 bit. There is nothing on this computer except Windows and MACH3. No antivirus, etc. nothing.
> > >
> > > TESTING RESULTS:
> > >
> > > Typed into MACH's screen 2 manual input line, M3 and M4 result in the following messages on the concole:
> > >
> > > Mach3 Notify Message 3, Direction = 1, Spindle set to xxxxxx
> > > Spindle CCW ON
> > > - and -
> > > Mach3 Notify Message 3, Direction = 0, Spindle set to xxxxxx
> > > Spindle CW ON
> > >
> > > Speed command 'Sxxxx' results in:
> > > Mach3 Notify Message 5, Direction = x, Spindle set to xxxxxx
> > > Spindle Speed Set To xxxxxxx
> > >
> > > In each of the above cases, there is an expected actual result; a direction change or speed change.
> > >
> > > Entry of M5 has no result. No message. ZIP. NADA. and of course no actual result.
> > >
> > > As I surmised, M5 is either not being sent by MACH, or the plug-in is not recognising it.
> > >
> > > = Steve
> > >
> > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > >
> > > > Hi Steve,
> > > >
> > > > Thanks.ÃÆ'ââ¬Å¡ÃâàHaving a working hardware output pin and having KFLOP Configured to use a Step/Dir Generator to use that pin in the TTL or Open collector modes are two different things is the reason we asked.ÃÆ'ââ¬Å¡ÃâàIt also wasn't clear if that was working reliably.ÃÆ'ââ¬Å¡ÃâàBut now it is clear.
> > > >
> > > > You of course should not need to change the M3 M4 macros to change the direction.ÃÆ'ââ¬Å¡ÃâàSo it would probably be best to remove that and find the real issue.
> > > >
> > > > Please check the Console in the manner I described and also post the requested files.
> > > >
> > > > Regards
> > > > TK
> > > >
> > > >
> > > >
> > > > ________________________________
> > > > From: Steve <steve@>
> > > > To: DynoMotion@yahoogroups.com
> > > > Sent: Monday, April 29, 2013 3:42 PM
> > > > Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
> > > >
> > > >
> > > >
> > > > ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > I mentioned in the OP that the pin functions normally, but if you need specifics, then yes the pin goes high and low when the box is checked in the digital I/O screen, the jog3 test that you asked for works fine, and as I also said, the direction is changing now, although not reliably. I have already done all of that.
> > > >
> > > > In fact I have a work around wherein I added an output to MACH and puta call in the M3 and M4 macros to toggle the output. I am using that output to change dir on the drive.
> > > > This is a MACH spindle problem and the remaining issue is that the spindle does not turn ON and OFF, which I believe is a different problem from the dir change. I have not been able to figure out a work around for the ON/OFF problem.
> > > >
> > > > I can see that the C programs are printing, but there is never any message on the MACH screen, so I will assume it is printing to the console and take a peek to see if there are any clues and let you know.
> > > >
> > > > - Steve
> > > >
> > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > >
> > > > > Hi Steve,
> > > > >
> > > > > Please perform the tests described in the previous email.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàThe idea of testing from the KMotion Console is not to test if the Spindle Runs, but rather if the direction changes properly and reliably.
> > > > >
> > > > > If that works reliably use the KMotion Console to check if the Mach3 messages are getting to KFLOP properly.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàYou will need to report back to us: What you commanded in Mach3, what was printed in the Console, and what happened.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàIt would also be helpful to look at the Digital IO Screen to see if your Dir Bit is high or low in each step.
> > > > >
> > > > > If you still can't figure it out attach the Spindle Mach3 C Program, your Init C Program, and your Mach3 XML file (with the standard screen set selected) so we can check them.
> > > > >
> > > > > Regards
> > > > > TK
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > ________________________________
> > > > > From: Steve <steve@>
> > > > > To: DynoMotion@yahoogroups.com
> > > > > Sent: Monday, April 29, 2013 1:16 PM
> > > > > Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
> > > > >
> > > > >
> > > > >
> > > > > ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > Tried checked and uncheched. No joy. Tried standard MACH screens; no joy.
> > > > >
> > > > > Tried the production version of the plugin; same behavior.
> > > > >
> > > > > ON/OFF commands are either not getting to the plugin, or are in the wrong format perhaps?
> > > > >
> > > > > If it matters, I am running 6 axis plus the spindle. The spindle axis (axis 6) is set up in the init file like all of the other axis.
> > > > >
> > > > > responds to speed changes and sporatically to M3 and M4 . . never responds to M5, which simply contains DoSpinStop()
> > > > >
> > > > > - Steve
> > > > >
> > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > >
> > > > > > Hi Steve,
> > > > > >
> > > > > > I think that the Mach3 option "Disable Spindle Relays" needs to be un-checked.ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàOtherwise Mach3 doesn't send Spindle off to the Plugin for some reason.
> > > > > >
> > > > > > Regards
> > > > > > TK
> > > > > >
> > > > > >
> > > > > >
> > > > > > ________________________________
> > > > > > From: Steve <steve@>
> > > > > > To: DynoMotion@yahoogroups.com
> > > > > > Sent: Monday, April 29, 2013 11:21 AM
> > > > > > Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
> > > > > >
> > > > > >
> > > > > >
> > > > > > ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > Note: The spindle DOES run, so the step signal is present, and I am checking for a dir signal on the Spindle DIR wire from the Kflop.
> > > > > >
> > > > > > I set up a step/dit spindle in the MACH config because the axis are configured within MACH.
> > > > > >
> > > > > > By removing the spindle from MACHs configuration, the M3 and M4 macros now change direction.
> > > > > >
> > > > > > However, M5 has no effect and the spindle starts as soon as a speed is entered and there is no way to shut it off except to enter a speed of zero.
> > > > > >
> > > > > > This is entering commands via MACHs MDI interface.
> > > > > >
> > > > > > It does not appear that ON/Off are being send or received. The spindle is locked ON at all times and responds only to speed (and now to direction via M3 and M4)
> > > > > >
> > > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > > >
> > > > > > > Hi Steve,
> > > > > > >
> > > > > > > First test the hardware and KFLOP configuration by Jogging the Spindle Axis both directions from the KMotion.exe Console Screen with something like Jog3=10000 and Jog3=-10000.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàDoes the axis move both ways?
> > > > > > >
> > > > > > > Our Plugin receives a Message (command action code), Direction, and Speed info from Mach3 which it writes into KFLOP before launching the spindle C program in KFLOP.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàThe Var parameter specifies which 3 consecutive UserData Variables in KFLOP the information will be placed.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàSo for example Var is typically configured to be 0, so the 3 pieces of information are placed into Variables 0, 1, and 2.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàThe Plugin
> Configuration and the way the C Program is written where to expect to find the data must match.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàOtherwise the C Program will use invalid data and things wont work at all.
> > > > > > >
> > > > > > > I'm not sure what you mean by:ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡Ãâà"MACH3 set up with Step/Dir spindle"ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàSince KFLOP handles all motion Mach3 doesn't need to know what type of Spindle is connected and how.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàIt just sends logical commands of speed, on, off, direction and the Plugin+KFLOP is expected to make it happen.
> > > > > > >
> > > > > > > If your C Program contains diagnostic printout messages you can look at the KMotion Console Screen to see exactly if/what messages, speeds, directions, KFLOP is receiving.
> > > > > > >
> > > > > > > If you still have problems post your Mach3 XML file and Spindle C program so we can check it.
> > > > > > >
> > > > > > >
> > > > > > > HTH
> > > > > > > Regards
> > > > > > > TK
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > ________________________________
> > > > > > > From: Steve <steve@>
> > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > Sent: Monday, April 29, 2013 4:09 AM
> > > > > > > Subject: [DynoMotion] Mach3 servo spindle - no direction change
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > Using example SpindleMach3Jog.c with MACH3/KFLOP
> > > > > > >
> > > > > > > MACH3 set up with Step/Dir spindle
> > > > > > >
> > > > > > > Spindle motor runs, but there is no direction change. Testing the Kflop default spindle dir pin (hardware) shows it to be functional, but there is no dir change signal coming off the pin.
> > > > > > >
> > > > > > > Documentation and forum search do not have an answer that I can find.
> > > > > > >
> > > > > > > The plug-in config has a setting for 0=msg 1=dir 2=speed. Any setting other then 0 leaves spindle inoperative. What is the purpose of this setting? Is there any documentation?
> > > > > > >
> > > > > > > Thanks,
> > > > > > >
> > > > > > > -Steve
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
|
|
Group: DynoMotion |
Message: 7435 |
From: Steve |
Date: 5/6/2013 |
Subject: Re: Mach3 servo spindle - no direction change |
Tom explained that MACH reports a direction of -1 if the spindle is currently in the ON state, so using that param may be more reliable . . provided MACH does not change the way the param works.
A variation of the program that uses this method is available here:
http://www.thecubestudio.com/Kflop/SpindleMach3JogSimpsonRev1.htm
There are only a couple of line to add to the standard sample program and they are shown in red.
- Steve
--- In DynoMotion@yahoogroups.com, "Steve" <steve@...> wrote:
>
>
>
> I'm told that my use of the 'new' rich text editor (to highlight the progtram changes) may have caused the error. At the bottom of this post is a link to the program with the lines that I added or changed highlighted in red. I don't know much about Yahoo, but hopefully the link will work.
>
> The fundamental change is approach is to track the state of the spindle and only do a 'live' speed change iof the spindle is alrady running.
>
> Spindle ON commands (M3 M4) have separate instruction strings.
>
> There may be an elegant way to determine the spindle state, but absent a programmers reference, the down and dirty solutionwas to create a volatile variable and update it locally on each stae change. The variable ('SpindleIsRunning')is then used to condition the response to a speed change command.
>
> Use my example to add the lines to the SpindleMach3Jog.c sample file that comes with the Kflop. Make sure you enter channel/axis number and other params that are correct for your system.
>
> Rename it to something specific to your setup to keep the original example fiel intact and enter the new file name in the plug-in configuration.
>
> I have a custom speed 'slider' control on my screen along with buttons for cw, ccw and spindle stop. All are working properly with the modified program in the link above. G-code also works correctly.
>
> http://www.thecubestudio.com/Kflop/SpindleMach3JogSimpson.htm
>
> - Steve
>
>
>
>
>
>
>
>
> --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> >
> > Hi Steve,
> >
> > Please email it to me and I'll upload it.
> >
> > Thanks
> > TK
> >
> >
> >
> > ________________________________
> > From: Steve <steve@>
> > To: DynoMotion@yahoogroups.com
> > Sent: Friday, May 3, 2013 12:27 AM
> > Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
> >
> >
> >
> > Â
> > Tom,
> >
> > I tried to post the program, but an error message was thrown up saying that the request could not be completed.
> >
> > =Steve
> >
> > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > >
> > > Hi Steve,
> > >
> > > Could you post your Spindle Program with the bug fixed.ÃÂ It would help solve a problem Tapio is having.
> > >
> > > Thanks
> > > TK
> > >
> > >
> > >
> > >
> > > ________________________________
> > > From: Steve <steve@>
> > > To: DynoMotion@yahoogroups.com
> > > Sent: Tuesday, April 30, 2013 5:08 AM
> > > Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
> > >
> > >
> > >
> > > ÃÂ
> > >
> > >
> > > I clarified the work-arounds (aka 'hacks') because you asked about them. They have no effect on the issue in any case, but to answer your question; for testing, everything is box-stock. No mods, work-arounds, custom screens or anything non-standard at all.
> > >
> > > Only the Kflop device is 'new' to me. I am not a novice and I understand establishing a base-line.
> > >
> > > I seem to have everything working now including my custom screen buttons that control the spindle. The solution for my application was to make changes to the spindle jog program.
> > >
> > > What I think is a significant problem in the sample program is the unconditional start of the spindle with a speed change input. If the speed command ('Sxxx')comes befor the Spindle ON command (M4, M3)the net result is an unexpected spindle start which is potentially very dangerous. Just my 2 cents worth. Take it as you like.
> > >
> > > I have solved this by making the Speed changing 'jog' conditional on the spindle being ON at the time of the speed change. If the spindle is OFF, a speed change updates the parameter but does not start the spindle.
> > >
> > > Thanks very much for the prompt replies and suggestions.
> > >
> > > - Steve
> > >
> > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > >
> > > > Hi Steve,
> > > >
> > > > You can of course do whatever you wish when you are not trying to troubleshoot problems, but it would be less confusing if the "hacks" were removed when testing.ÃâàWere the hacks removed when you performed the tests?
> > > >
> > > > Strange.ÃâàHaving M5 send no message is the exact behavior when Disable Spindle Relays is checked.ÃâàYou might double check that.
> > > >
> > > > Please send the requested files.
> > > >
> > > > Regards
> > > > TK
> > > >
> > > >
> > > >
> > > >
> > > > ________________________________
> > > > From: Steve <steve@>
> > > > To: DynoMotion@yahoogroups.com
> > > > Sent: Monday, April 29, 2013 7:38 PM
> > > > Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
> > > >
> > > >
> > > >
> > > > ÃâÃÂ
> > > > My M3 and M4 'hacks' are work arounds so that the machine can do useful work. I switched over to a new computer with the Kflop on a machine that has to make parts for a living, so I can only do testing between runs. I will remove the 'hacks' and the patched in dir pin when we resolve the problem with the plug-in.
> > > >
> > > > FWIW, the new computer is all Intel (except the memory sticks). Intel processor, Intel Motherboard, and Intel SSD. Fresh install Win7 Pro 32 bit. There is nothing on this computer except Windows and MACH3. No antivirus, etc. nothing.
> > > >
> > > > TESTING RESULTS:
> > > >
> > > > Typed into MACH's screen 2 manual input line, M3 and M4 result in the following messages on the concole:
> > > >
> > > > Mach3 Notify Message 3, Direction = 1, Spindle set to xxxxxx
> > > > Spindle CCW ON
> > > > - and -
> > > > Mach3 Notify Message 3, Direction = 0, Spindle set to xxxxxx
> > > > Spindle CW ON
> > > >
> > > > Speed command 'Sxxxx' results in:
> > > > Mach3 Notify Message 5, Direction = x, Spindle set to xxxxxx
> > > > Spindle Speed Set To xxxxxxx
> > > >
> > > > In each of the above cases, there is an expected actual result; a direction change or speed change.
> > > >
> > > > Entry of M5 has no result. No message. ZIP. NADA. and of course no actual result.
> > > >
> > > > As I surmised, M5 is either not being sent by MACH, or the plug-in is not recognising it.
> > > >
> > > > = Steve
> > > >
> > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > >
> > > > > Hi Steve,
> > > > >
> > > > > Thanks.ÃÆ'ââ¬Å¡ÃâàHaving a working hardware output pin and having KFLOP Configured to use a Step/Dir Generator to use that pin in the TTL or Open collector modes are two different things is the reason we asked.ÃÆ'ââ¬Å¡ÃâàIt also wasn't clear if that was working reliably.ÃÆ'ââ¬Å¡ÃâàBut now it is clear.
> > > > >
> > > > > You of course should not need to change the M3 M4 macros to change the direction.ÃÆ'ââ¬Å¡ÃâàSo it would probably be best to remove that and find the real issue.
> > > > >
> > > > > Please check the Console in the manner I described and also post the requested files.
> > > > >
> > > > > Regards
> > > > > TK
> > > > >
> > > > >
> > > > >
> > > > > ________________________________
> > > > > From: Steve <steve@>
> > > > > To: DynoMotion@yahoogroups.com
> > > > > Sent: Monday, April 29, 2013 3:42 PM
> > > > > Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
> > > > >
> > > > >
> > > > >
> > > > > ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > I mentioned in the OP that the pin functions normally, but if you need specifics, then yes the pin goes high and low when the box is checked in the digital I/O screen, the jog3 test that you asked for works fine, and as I also said, the direction is changing now, although not reliably. I have already done all of that.
> > > > >
> > > > > In fact I have a work around wherein I added an output to MACH and puta call in the M3 and M4 macros to toggle the output. I am using that output to change dir on the drive.
> > > > > This is a MACH spindle problem and the remaining issue is that the spindle does not turn ON and OFF, which I believe is a different problem from the dir change. I have not been able to figure out a work around for the ON/OFF problem.
> > > > >
> > > > > I can see that the C programs are printing, but there is never any message on the MACH screen, so I will assume it is printing to the console and take a peek to see if there are any clues and let you know.
> > > > >
> > > > > - Steve
> > > > >
> > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > >
> > > > > > Hi Steve,
> > > > > >
> > > > > > Please perform the tests described in the previous email.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàThe idea of testing from the KMotion Console is not to test if the Spindle Runs, but rather if the direction changes properly and reliably.
> > > > > >
> > > > > > If that works reliably use the KMotion Console to check if the Mach3 messages are getting to KFLOP properly.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàYou will need to report back to us: What you commanded in Mach3, what was printed in the Console, and what happened.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàIt would also be helpful to look at the Digital IO Screen to see if your Dir Bit is high or low in each step.
> > > > > >
> > > > > > If you still can't figure it out attach the Spindle Mach3 C Program, your Init C Program, and your Mach3 XML file (with the standard screen set selected) so we can check them.
> > > > > >
> > > > > > Regards
> > > > > > TK
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > ________________________________
> > > > > > From: Steve <steve@>
> > > > > > To: DynoMotion@yahoogroups.com
> > > > > > Sent: Monday, April 29, 2013 1:16 PM
> > > > > > Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
> > > > > >
> > > > > >
> > > > > >
> > > > > > ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > Tried checked and uncheched. No joy. Tried standard MACH screens; no joy.
> > > > > >
> > > > > > Tried the production version of the plugin; same behavior.
> > > > > >
> > > > > > ON/OFF commands are either not getting to the plugin, or are in the wrong format perhaps?
> > > > > >
> > > > > > If it matters, I am running 6 axis plus the spindle. The spindle axis (axis 6) is set up in the init file like all of the other axis.
> > > > > >
> > > > > > responds to speed changes and sporatically to M3 and M4 . . never responds to M5, which simply contains DoSpinStop()
> > > > > >
> > > > > > - Steve
> > > > > >
> > > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > > >
> > > > > > > Hi Steve,
> > > > > > >
> > > > > > > I think that the Mach3 option "Disable Spindle Relays" needs to be un-checked.ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàOtherwise Mach3 doesn't send Spindle off to the Plugin for some reason.
> > > > > > >
> > > > > > > Regards
> > > > > > > TK
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > ________________________________
> > > > > > > From: Steve <steve@>
> > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > Sent: Monday, April 29, 2013 11:21 AM
> > > > > > > Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > Note: The spindle DOES run, so the step signal is present, and I am checking for a dir signal on the Spindle DIR wire from the Kflop.
> > > > > > >
> > > > > > > I set up a step/dit spindle in the MACH config because the axis are configured within MACH.
> > > > > > >
> > > > > > > By removing the spindle from MACHs configuration, the M3 and M4 macros now change direction.
> > > > > > >
> > > > > > > However, M5 has no effect and the spindle starts as soon as a speed is entered and there is no way to shut it off except to enter a speed of zero.
> > > > > > >
> > > > > > > This is entering commands via MACHs MDI interface.
> > > > > > >
> > > > > > > It does not appear that ON/Off are being send or received. The spindle is locked ON at all times and responds only to speed (and now to direction via M3 and M4)
> > > > > > >
> > > > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > > > >
> > > > > > > > Hi Steve,
> > > > > > > >
> > > > > > > > First test the hardware and KFLOP configuration by Jogging the Spindle Axis both directions from the KMotion.exe Console Screen with something like Jog3=10000 and Jog3=-10000.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàDoes the axis move both ways?
> > > > > > > >
> > > > > > > > Our Plugin receives a Message (command action code), Direction, and Speed info from Mach3 which it writes into KFLOP before launching the spindle C program in KFLOP.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàThe Var parameter specifies which 3 consecutive UserData Variables in KFLOP the information will be placed.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàSo for example Var is typically configured to be 0, so the 3 pieces of information are placed into Variables 0, 1, and 2.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàThe Plugin
> > Configuration and the way the C Program is written where to expect to find the data must match.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàOtherwise the C Program will use invalid data and things wont work at all.
> > > > > > > >
> > > > > > > > I'm not sure what you mean by:ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡Ãâà"MACH3 set up with Step/Dir spindle"ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàSince KFLOP handles all motion Mach3 doesn't need to know what type of Spindle is connected and how.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàIt just sends logical commands of speed, on, off, direction and the Plugin+KFLOP is expected to make it happen.
> > > > > > > >
> > > > > > > > If your C Program contains diagnostic printout messages you can look at the KMotion Console Screen to see exactly if/what messages, speeds, directions, KFLOP is receiving.
> > > > > > > >
> > > > > > > > If you still have problems post your Mach3 XML file and Spindle C program so we can check it.
> > > > > > > >
> > > > > > > >
> > > > > > > > HTH
> > > > > > > > Regards
> > > > > > > > TK
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > ________________________________
> > > > > > > > From: Steve <steve@>
> > > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > > Sent: Monday, April 29, 2013 4:09 AM
> > > > > > > > Subject: [DynoMotion] Mach3 servo spindle - no direction change
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > > Using example SpindleMach3Jog.c with MACH3/KFLOP
> > > > > > > >
> > > > > > > > MACH3 set up with Step/Dir spindle
> > > > > > > >
> > > > > > > > Spindle motor runs, but there is no direction change. Testing the Kflop default spindle dir pin (hardware) shows it to be functional, but there is no dir change signal coming off the pin.
> > > > > > > >
> > > > > > > > Documentation and forum search do not have an answer that I can find.
> > > > > > > >
> > > > > > > > The plug-in config has a setting for 0=msg 1=dir 2=speed. Any setting other then 0 leaves spindle inoperative. What is the purpose of this setting? Is there any documentation?
> > > > > > > >
> > > > > > > > Thanks,
> > > > > > > >
> > > > > > > > -Steve
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
|
|
Group: DynoMotion |
Message: 7436 |
From: Steve |
Date: 5/6/2013 |
Subject: Re: Mach3 servo spindle - no direction change |
Correction:
Direction -1 is reported by MACH for spindle OFF condition. Sorry for typo. Program is correct.
--- In DynoMotion@yahoogroups.com, "Steve" <steve@...> wrote:
>
>
>
>
> Tom explained that MACH reports a direction of -1 if the spindle is currently in the ON state, so using that param may be more reliable . . provided MACH does not change the way the param works.
>
> A variation of the program that uses this method is available here:
>
> http://www.thecubestudio.com/Kflop/SpindleMach3JogSimpsonRev1.htm
>
> There are only a couple of line to add to the standard sample program and they are shown in red.
>
> - Steve
>
>
> --- In DynoMotion@yahoogroups.com, "Steve" <steve@> wrote:
> >
> >
> >
> > I'm told that my use of the 'new' rich text editor (to highlight the progtram changes) may have caused the error. At the bottom of this post is a link to the program with the lines that I added or changed highlighted in red. I don't know much about Yahoo, but hopefully the link will work.
> >
> > The fundamental change is approach is to track the state of the spindle and only do a 'live' speed change iof the spindle is alrady running.
> >
> > Spindle ON commands (M3 M4) have separate instruction strings.
> >
> > There may be an elegant way to determine the spindle state, but absent a programmers reference, the down and dirty solutionwas to create a volatile variable and update it locally on each stae change. The variable ('SpindleIsRunning')is then used to condition the response to a speed change command.
> >
> > Use my example to add the lines to the SpindleMach3Jog.c sample file that comes with the Kflop. Make sure you enter channel/axis number and other params that are correct for your system.
> >
> > Rename it to something specific to your setup to keep the original example fiel intact and enter the new file name in the plug-in configuration.
> >
> > I have a custom speed 'slider' control on my screen along with buttons for cw, ccw and spindle stop. All are working properly with the modified program in the link above. G-code also works correctly.
> >
> > http://www.thecubestudio.com/Kflop/SpindleMach3JogSimpson.htm
> >
> > - Steve
> >
> >
> >
> >
> >
> >
> >
> >
> > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > >
> > > Hi Steve,
> > >
> > > Please email it to me and I'll upload it.
> > >
> > > Thanks
> > > TK
> > >
> > >
> > >
> > > ________________________________
> > > From: Steve <steve@>
> > > To: DynoMotion@yahoogroups.com
> > > Sent: Friday, May 3, 2013 12:27 AM
> > > Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
> > >
> > >
> > >
> > > Â
> > > Tom,
> > >
> > > I tried to post the program, but an error message was thrown up saying that the request could not be completed.
> > >
> > > =Steve
> > >
> > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > >
> > > > Hi Steve,
> > > >
> > > > Could you post your Spindle Program with the bug fixed.ÃÂ It would help solve a problem Tapio is having.
> > > >
> > > > Thanks
> > > > TK
> > > >
> > > >
> > > >
> > > >
> > > > ________________________________
> > > > From: Steve <steve@>
> > > > To: DynoMotion@yahoogroups.com
> > > > Sent: Tuesday, April 30, 2013 5:08 AM
> > > > Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
> > > >
> > > >
> > > >
> > > > ÃÂ
> > > >
> > > >
> > > > I clarified the work-arounds (aka 'hacks') because you asked about them. They have no effect on the issue in any case, but to answer your question; for testing, everything is box-stock. No mods, work-arounds, custom screens or anything non-standard at all.
> > > >
> > > > Only the Kflop device is 'new' to me. I am not a novice and I understand establishing a base-line.
> > > >
> > > > I seem to have everything working now including my custom screen buttons that control the spindle. The solution for my application was to make changes to the spindle jog program.
> > > >
> > > > What I think is a significant problem in the sample program is the unconditional start of the spindle with a speed change input. If the speed command ('Sxxx')comes befor the Spindle ON command (M4, M3)the net result is an unexpected spindle start which is potentially very dangerous. Just my 2 cents worth. Take it as you like.
> > > >
> > > > I have solved this by making the Speed changing 'jog' conditional on the spindle being ON at the time of the speed change. If the spindle is OFF, a speed change updates the parameter but does not start the spindle.
> > > >
> > > > Thanks very much for the prompt replies and suggestions.
> > > >
> > > > - Steve
> > > >
> > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > >
> > > > > Hi Steve,
> > > > >
> > > > > You can of course do whatever you wish when you are not trying to troubleshoot problems, but it would be less confusing if the "hacks" were removed when testing.ÃâàWere the hacks removed when you performed the tests?
> > > > >
> > > > > Strange.ÃâàHaving M5 send no message is the exact behavior when Disable Spindle Relays is checked.ÃâàYou might double check that.
> > > > >
> > > > > Please send the requested files.
> > > > >
> > > > > Regards
> > > > > TK
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > ________________________________
> > > > > From: Steve <steve@>
> > > > > To: DynoMotion@yahoogroups.com
> > > > > Sent: Monday, April 29, 2013 7:38 PM
> > > > > Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
> > > > >
> > > > >
> > > > >
> > > > > ÃâÃÂ
> > > > > My M3 and M4 'hacks' are work arounds so that the machine can do useful work. I switched over to a new computer with the Kflop on a machine that has to make parts for a living, so I can only do testing between runs. I will remove the 'hacks' and the patched in dir pin when we resolve the problem with the plug-in.
> > > > >
> > > > > FWIW, the new computer is all Intel (except the memory sticks). Intel processor, Intel Motherboard, and Intel SSD. Fresh install Win7 Pro 32 bit. There is nothing on this computer except Windows and MACH3. No antivirus, etc. nothing.
> > > > >
> > > > > TESTING RESULTS:
> > > > >
> > > > > Typed into MACH's screen 2 manual input line, M3 and M4 result in the following messages on the concole:
> > > > >
> > > > > Mach3 Notify Message 3, Direction = 1, Spindle set to xxxxxx
> > > > > Spindle CCW ON
> > > > > - and -
> > > > > Mach3 Notify Message 3, Direction = 0, Spindle set to xxxxxx
> > > > > Spindle CW ON
> > > > >
> > > > > Speed command 'Sxxxx' results in:
> > > > > Mach3 Notify Message 5, Direction = x, Spindle set to xxxxxx
> > > > > Spindle Speed Set To xxxxxxx
> > > > >
> > > > > In each of the above cases, there is an expected actual result; a direction change or speed change.
> > > > >
> > > > > Entry of M5 has no result. No message. ZIP. NADA. and of course no actual result.
> > > > >
> > > > > As I surmised, M5 is either not being sent by MACH, or the plug-in is not recognising it.
> > > > >
> > > > > = Steve
> > > > >
> > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > >
> > > > > > Hi Steve,
> > > > > >
> > > > > > Thanks.ÃÆ'ââ¬Å¡ÃâàHaving a working hardware output pin and having KFLOP Configured to use a Step/Dir Generator to use that pin in the TTL or Open collector modes are two different things is the reason we asked.ÃÆ'ââ¬Å¡ÃâàIt also wasn't clear if that was working reliably.ÃÆ'ââ¬Å¡ÃâàBut now it is clear.
> > > > > >
> > > > > > You of course should not need to change the M3 M4 macros to change the direction.ÃÆ'ââ¬Å¡ÃâàSo it would probably be best to remove that and find the real issue.
> > > > > >
> > > > > > Please check the Console in the manner I described and also post the requested files.
> > > > > >
> > > > > > Regards
> > > > > > TK
> > > > > >
> > > > > >
> > > > > >
> > > > > > ________________________________
> > > > > > From: Steve <steve@>
> > > > > > To: DynoMotion@yahoogroups.com
> > > > > > Sent: Monday, April 29, 2013 3:42 PM
> > > > > > Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
> > > > > >
> > > > > >
> > > > > >
> > > > > > ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > I mentioned in the OP that the pin functions normally, but if you need specifics, then yes the pin goes high and low when the box is checked in the digital I/O screen, the jog3 test that you asked for works fine, and as I also said, the direction is changing now, although not reliably. I have already done all of that.
> > > > > >
> > > > > > In fact I have a work around wherein I added an output to MACH and puta call in the M3 and M4 macros to toggle the output. I am using that output to change dir on the drive.
> > > > > > This is a MACH spindle problem and the remaining issue is that the spindle does not turn ON and OFF, which I believe is a different problem from the dir change. I have not been able to figure out a work around for the ON/OFF problem.
> > > > > >
> > > > > > I can see that the C programs are printing, but there is never any message on the MACH screen, so I will assume it is printing to the console and take a peek to see if there are any clues and let you know.
> > > > > >
> > > > > > - Steve
> > > > > >
> > > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > > >
> > > > > > > Hi Steve,
> > > > > > >
> > > > > > > Please perform the tests described in the previous email.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàThe idea of testing from the KMotion Console is not to test if the Spindle Runs, but rather if the direction changes properly and reliably.
> > > > > > >
> > > > > > > If that works reliably use the KMotion Console to check if the Mach3 messages are getting to KFLOP properly.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàYou will need to report back to us: What you commanded in Mach3, what was printed in the Console, and what happened.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàIt would also be helpful to look at the Digital IO Screen to see if your Dir Bit is high or low in each step.
> > > > > > >
> > > > > > > If you still can't figure it out attach the Spindle Mach3 C Program, your Init C Program, and your Mach3 XML file (with the standard screen set selected) so we can check them.
> > > > > > >
> > > > > > > Regards
> > > > > > > TK
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > ________________________________
> > > > > > > From: Steve <steve@>
> > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > Sent: Monday, April 29, 2013 1:16 PM
> > > > > > > Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > Tried checked and uncheched. No joy. Tried standard MACH screens; no joy.
> > > > > > >
> > > > > > > Tried the production version of the plugin; same behavior.
> > > > > > >
> > > > > > > ON/OFF commands are either not getting to the plugin, or are in the wrong format perhaps?
> > > > > > >
> > > > > > > If it matters, I am running 6 axis plus the spindle. The spindle axis (axis 6) is set up in the init file like all of the other axis.
> > > > > > >
> > > > > > > responds to speed changes and sporatically to M3 and M4 . . never responds to M5, which simply contains DoSpinStop()
> > > > > > >
> > > > > > > - Steve
> > > > > > >
> > > > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > > > >
> > > > > > > > Hi Steve,
> > > > > > > >
> > > > > > > > I think that the Mach3 option "Disable Spindle Relays" needs to be un-checked.ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàOtherwise Mach3 doesn't send Spindle off to the Plugin for some reason.
> > > > > > > >
> > > > > > > > Regards
> > > > > > > > TK
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > ________________________________
> > > > > > > > From: Steve <steve@>
> > > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > > Sent: Monday, April 29, 2013 11:21 AM
> > > > > > > > Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > > Note: The spindle DOES run, so the step signal is present, and I am checking for a dir signal on the Spindle DIR wire from the Kflop.
> > > > > > > >
> > > > > > > > I set up a step/dit spindle in the MACH config because the axis are configured within MACH.
> > > > > > > >
> > > > > > > > By removing the spindle from MACHs configuration, the M3 and M4 macros now change direction.
> > > > > > > >
> > > > > > > > However, M5 has no effect and the spindle starts as soon as a speed is entered and there is no way to shut it off except to enter a speed of zero.
> > > > > > > >
> > > > > > > > This is entering commands via MACHs MDI interface.
> > > > > > > >
> > > > > > > > It does not appear that ON/Off are being send or received. The spindle is locked ON at all times and responds only to speed (and now to direction via M3 and M4)
> > > > > > > >
> > > > > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > > > > >
> > > > > > > > > Hi Steve,
> > > > > > > > >
> > > > > > > > > First test the hardware and KFLOP configuration by Jogging the Spindle Axis both directions from the KMotion.exe Console Screen with something like Jog3=10000 and Jog3=-10000.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàDoes the axis move both ways?
> > > > > > > > >
> > > > > > > > > Our Plugin receives a Message (command action code), Direction, and Speed info from Mach3 which it writes into KFLOP before launching the spindle C program in KFLOP.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàThe Var parameter specifies which 3 consecutive UserData Variables in KFLOP the information will be placed.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàSo for example Var is typically configured to be 0, so the 3 pieces of information are placed into Variables 0, 1, and 2.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàThe Plugin
> > > Configuration and the way the C Program is written where to expect to find the data must match.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàOtherwise the C Program will use invalid data and things wont work at all.
> > > > > > > > >
> > > > > > > > > I'm not sure what you mean by:ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡Ãâà"MACH3 set up with Step/Dir spindle"ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàSince KFLOP handles all motion Mach3 doesn't need to know what type of Spindle is connected and how.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàIt just sends logical commands of speed, on, off, direction and the Plugin+KFLOP is expected to make it happen.
> > > > > > > > >
> > > > > > > > > If your C Program contains diagnostic printout messages you can look at the KMotion Console Screen to see exactly if/what messages, speeds, directions, KFLOP is receiving.
> > > > > > > > >
> > > > > > > > > If you still have problems post your Mach3 XML file and Spindle C program so we can check it.
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > HTH
> > > > > > > > > Regards
> > > > > > > > > TK
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > ________________________________
> > > > > > > > > From: Steve <steve@>
> > > > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > > > Sent: Monday, April 29, 2013 4:09 AM
> > > > > > > > > Subject: [DynoMotion] Mach3 servo spindle - no direction change
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > > > Using example SpindleMach3Jog.c with MACH3/KFLOP
> > > > > > > > >
> > > > > > > > > MACH3 set up with Step/Dir spindle
> > > > > > > > >
> > > > > > > > > Spindle motor runs, but there is no direction change. Testing the Kflop default spindle dir pin (hardware) shows it to be functional, but there is no dir change signal coming off the pin.
> > > > > > > > >
> > > > > > > > > Documentation and forum search do not have an answer that I can find.
> > > > > > > > >
> > > > > > > > > The plug-in config has a setting for 0=msg 1=dir 2=speed. Any setting other then 0 leaves spindle inoperative. What is the purpose of this setting? Is there any documentation?
> > > > > > > > >
> > > > > > > > > Thanks,
> > > > > > > > >
> > > > > > > > > -Steve
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
|
|
Group: DynoMotion |
Message: 7459 |
From: Steve |
Date: 5/14/2013 |
Subject: Re: Mach3 servo spindle - no direction change |
The unexpected spindle ON with any speed change input is still present when MACH is first started. Once this initial toggle is passed, the solution works .
I'm just posting this as a head's up as it is definately something to be aware of and is potentially dangerous.
I will try putting an M5 in the reset and/or a 'Jog 0' command in the Kflop init and see if either of these will correctly set the system status on startup so that a speed change does not cause the unexpected spindle start.
- Steve
--- In DynoMotion@yahoogroups.com, "Steve" <steve@...> wrote:
>
> Correction:
>
> Direction -1 is reported by MACH for spindle OFF condition. Sorry for typo. Program is correct.
>
> --- In DynoMotion@yahoogroups.com, "Steve" <steve@> wrote:
> >
> >
> >
> >
> > Tom explained that MACH reports a direction of -1 if the spindle is currently in the ON state, so using that param may be more reliable . . provided MACH does not change the way the param works.
> >
> > A variation of the program that uses this method is available here:
> >
> > http://www.thecubestudio.com/Kflop/SpindleMach3JogSimpsonRev1.htm
> >
> > There are only a couple of line to add to the standard sample program and they are shown in red.
> >
> > - Steve
> >
> >
> > --- In DynoMotion@yahoogroups.com, "Steve" <steve@> wrote:
> > >
> > >
> > >
> > > I'm told that my use of the 'new' rich text editor (to highlight the progtram changes) may have caused the error. At the bottom of this post is a link to the program with the lines that I added or changed highlighted in red. I don't know much about Yahoo, but hopefully the link will work.
> > >
> > > The fundamental change is approach is to track the state of the spindle and only do a 'live' speed change iof the spindle is alrady running.
> > >
> > > Spindle ON commands (M3 M4) have separate instruction strings.
> > >
> > > There may be an elegant way to determine the spindle state, but absent a programmers reference, the down and dirty solutionwas to create a volatile variable and update it locally on each stae change. The variable ('SpindleIsRunning')is then used to condition the response to a speed change command.
> > >
> > > Use my example to add the lines to the SpindleMach3Jog.c sample file that comes with the Kflop. Make sure you enter channel/axis number and other params that are correct for your system.
> > >
> > > Rename it to something specific to your setup to keep the original example fiel intact and enter the new file name in the plug-in configuration.
> > >
> > > I have a custom speed 'slider' control on my screen along with buttons for cw, ccw and spindle stop. All are working properly with the modified program in the link above. G-code also works correctly.
> > >
> > > http://www.thecubestudio.com/Kflop/SpindleMach3JogSimpson.htm
> > >
> > > - Steve
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > >
> > > > Hi Steve,
> > > >
> > > > Please email it to me and I'll upload it.
> > > >
> > > > Thanks
> > > > TK
> > > >
> > > >
> > > >
> > > > ________________________________
> > > > From: Steve <steve@>
> > > > To: DynoMotion@yahoogroups.com
> > > > Sent: Friday, May 3, 2013 12:27 AM
> > > > Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
> > > >
> > > >
> > > >
> > > > Â
> > > > Tom,
> > > >
> > > > I tried to post the program, but an error message was thrown up saying that the request could not be completed.
> > > >
> > > > =Steve
> > > >
> > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > >
> > > > > Hi Steve,
> > > > >
> > > > > Could you post your Spindle Program with the bug fixed.ÃÂ It would help solve a problem Tapio is having.
> > > > >
> > > > > Thanks
> > > > > TK
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > ________________________________
> > > > > From: Steve <steve@>
> > > > > To: DynoMotion@yahoogroups.com
> > > > > Sent: Tuesday, April 30, 2013 5:08 AM
> > > > > Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
> > > > >
> > > > >
> > > > >
> > > > > ÃÂ
> > > > >
> > > > >
> > > > > I clarified the work-arounds (aka 'hacks') because you asked about them. They have no effect on the issue in any case, but to answer your question; for testing, everything is box-stock. No mods, work-arounds, custom screens or anything non-standard at all.
> > > > >
> > > > > Only the Kflop device is 'new' to me. I am not a novice and I understand establishing a base-line.
> > > > >
> > > > > I seem to have everything working now including my custom screen buttons that control the spindle. The solution for my application was to make changes to the spindle jog program.
> > > > >
> > > > > What I think is a significant problem in the sample program is the unconditional start of the spindle with a speed change input. If the speed command ('Sxxx')comes befor the Spindle ON command (M4, M3)the net result is an unexpected spindle start which is potentially very dangerous. Just my 2 cents worth. Take it as you like.
> > > > >
> > > > > I have solved this by making the Speed changing 'jog' conditional on the spindle being ON at the time of the speed change. If the spindle is OFF, a speed change updates the parameter but does not start the spindle.
> > > > >
> > > > > Thanks very much for the prompt replies and suggestions.
> > > > >
> > > > > - Steve
> > > > >
> > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > >
> > > > > > Hi Steve,
> > > > > >
> > > > > > You can of course do whatever you wish when you are not trying to troubleshoot problems, but it would be less confusing if the "hacks" were removed when testing.ÃâàWere the hacks removed when you performed the tests?
> > > > > >
> > > > > > Strange.ÃâàHaving M5 send no message is the exact behavior when Disable Spindle Relays is checked.ÃâàYou might double check that.
> > > > > >
> > > > > > Please send the requested files.
> > > > > >
> > > > > > Regards
> > > > > > TK
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > ________________________________
> > > > > > From: Steve <steve@>
> > > > > > To: DynoMotion@yahoogroups.com
> > > > > > Sent: Monday, April 29, 2013 7:38 PM
> > > > > > Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
> > > > > >
> > > > > >
> > > > > >
> > > > > > ÃâÃÂ
> > > > > > My M3 and M4 'hacks' are work arounds so that the machine can do useful work. I switched over to a new computer with the Kflop on a machine that has to make parts for a living, so I can only do testing between runs. I will remove the 'hacks' and the patched in dir pin when we resolve the problem with the plug-in.
> > > > > >
> > > > > > FWIW, the new computer is all Intel (except the memory sticks). Intel processor, Intel Motherboard, and Intel SSD. Fresh install Win7 Pro 32 bit. There is nothing on this computer except Windows and MACH3. No antivirus, etc. nothing.
> > > > > >
> > > > > > TESTING RESULTS:
> > > > > >
> > > > > > Typed into MACH's screen 2 manual input line, M3 and M4 result in the following messages on the concole:
> > > > > >
> > > > > > Mach3 Notify Message 3, Direction = 1, Spindle set to xxxxxx
> > > > > > Spindle CCW ON
> > > > > > - and -
> > > > > > Mach3 Notify Message 3, Direction = 0, Spindle set to xxxxxx
> > > > > > Spindle CW ON
> > > > > >
> > > > > > Speed command 'Sxxxx' results in:
> > > > > > Mach3 Notify Message 5, Direction = x, Spindle set to xxxxxx
> > > > > > Spindle Speed Set To xxxxxxx
> > > > > >
> > > > > > In each of the above cases, there is an expected actual result; a direction change or speed change.
> > > > > >
> > > > > > Entry of M5 has no result. No message. ZIP. NADA. and of course no actual result.
> > > > > >
> > > > > > As I surmised, M5 is either not being sent by MACH, or the plug-in is not recognising it.
> > > > > >
> > > > > > = Steve
> > > > > >
> > > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > > >
> > > > > > > Hi Steve,
> > > > > > >
> > > > > > > Thanks.ÃÆ'ââ¬Å¡ÃâàHaving a working hardware output pin and having KFLOP Configured to use a Step/Dir Generator to use that pin in the TTL or Open collector modes are two different things is the reason we asked.ÃÆ'ââ¬Å¡ÃâàIt also wasn't clear if that was working reliably.ÃÆ'ââ¬Å¡ÃâàBut now it is clear.
> > > > > > >
> > > > > > > You of course should not need to change the M3 M4 macros to change the direction.ÃÆ'ââ¬Å¡ÃâàSo it would probably be best to remove that and find the real issue.
> > > > > > >
> > > > > > > Please check the Console in the manner I described and also post the requested files.
> > > > > > >
> > > > > > > Regards
> > > > > > > TK
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > ________________________________
> > > > > > > From: Steve <steve@>
> > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > Sent: Monday, April 29, 2013 3:42 PM
> > > > > > > Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > I mentioned in the OP that the pin functions normally, but if you need specifics, then yes the pin goes high and low when the box is checked in the digital I/O screen, the jog3 test that you asked for works fine, and as I also said, the direction is changing now, although not reliably. I have already done all of that.
> > > > > > >
> > > > > > > In fact I have a work around wherein I added an output to MACH and puta call in the M3 and M4 macros to toggle the output. I am using that output to change dir on the drive.
> > > > > > > This is a MACH spindle problem and the remaining issue is that the spindle does not turn ON and OFF, which I believe is a different problem from the dir change. I have not been able to figure out a work around for the ON/OFF problem.
> > > > > > >
> > > > > > > I can see that the C programs are printing, but there is never any message on the MACH screen, so I will assume it is printing to the console and take a peek to see if there are any clues and let you know.
> > > > > > >
> > > > > > > - Steve
> > > > > > >
> > > > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > > > >
> > > > > > > > Hi Steve,
> > > > > > > >
> > > > > > > > Please perform the tests described in the previous email.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàThe idea of testing from the KMotion Console is not to test if the Spindle Runs, but rather if the direction changes properly and reliably.
> > > > > > > >
> > > > > > > > If that works reliably use the KMotion Console to check if the Mach3 messages are getting to KFLOP properly.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàYou will need to report back to us: What you commanded in Mach3, what was printed in the Console, and what happened.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàIt would also be helpful to look at the Digital IO Screen to see if your Dir Bit is high or low in each step.
> > > > > > > >
> > > > > > > > If you still can't figure it out attach the Spindle Mach3 C Program, your Init C Program, and your Mach3 XML file (with the standard screen set selected) so we can check them.
> > > > > > > >
> > > > > > > > Regards
> > > > > > > > TK
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > ________________________________
> > > > > > > > From: Steve <steve@>
> > > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > > Sent: Monday, April 29, 2013 1:16 PM
> > > > > > > > Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > > Tried checked and uncheched. No joy. Tried standard MACH screens; no joy.
> > > > > > > >
> > > > > > > > Tried the production version of the plugin; same behavior.
> > > > > > > >
> > > > > > > > ON/OFF commands are either not getting to the plugin, or are in the wrong format perhaps?
> > > > > > > >
> > > > > > > > If it matters, I am running 6 axis plus the spindle. The spindle axis (axis 6) is set up in the init file like all of the other axis.
> > > > > > > >
> > > > > > > > responds to speed changes and sporatically to M3 and M4 . . never responds to M5, which simply contains DoSpinStop()
> > > > > > > >
> > > > > > > > - Steve
> > > > > > > >
> > > > > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > > > > >
> > > > > > > > > Hi Steve,
> > > > > > > > >
> > > > > > > > > I think that the Mach3 option "Disable Spindle Relays" needs to be un-checked.ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàOtherwise Mach3 doesn't send Spindle off to the Plugin for some reason.
> > > > > > > > >
> > > > > > > > > Regards
> > > > > > > > > TK
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > ________________________________
> > > > > > > > > From: Steve <steve@>
> > > > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > > > Sent: Monday, April 29, 2013 11:21 AM
> > > > > > > > > Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > > > Note: The spindle DOES run, so the step signal is present, and I am checking for a dir signal on the Spindle DIR wire from the Kflop.
> > > > > > > > >
> > > > > > > > > I set up a step/dit spindle in the MACH config because the axis are configured within MACH.
> > > > > > > > >
> > > > > > > > > By removing the spindle from MACHs configuration, the M3 and M4 macros now change direction.
> > > > > > > > >
> > > > > > > > > However, M5 has no effect and the spindle starts as soon as a speed is entered and there is no way to shut it off except to enter a speed of zero.
> > > > > > > > >
> > > > > > > > > This is entering commands via MACHs MDI interface.
> > > > > > > > >
> > > > > > > > > It does not appear that ON/Off are being send or received. The spindle is locked ON at all times and responds only to speed (and now to direction via M3 and M4)
> > > > > > > > >
> > > > > > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > > > > > >
> > > > > > > > > > Hi Steve,
> > > > > > > > > >
> > > > > > > > > > First test the hardware and KFLOP configuration by Jogging the Spindle Axis both directions from the KMotion.exe Console Screen with something like Jog3=10000 and Jog3=-10000.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàDoes the axis move both ways?
> > > > > > > > > >
> > > > > > > > > > Our Plugin receives a Message (command action code), Direction, and Speed info from Mach3 which it writes into KFLOP before launching the spindle C program in KFLOP.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàThe Var parameter specifies which 3 consecutive UserData Variables in KFLOP the information will be placed.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàSo for example Var is typically configured to be 0, so the 3 pieces of information are placed into Variables 0, 1, and 2.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàThe Plugin
> > > > Configuration and the way the C Program is written where to expect to find the data must match.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàOtherwise the C Program will use invalid data and things wont work at all.
> > > > > > > > > >
> > > > > > > > > > I'm not sure what you mean by:ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡Ãâà"MACH3 set up with Step/Dir spindle"ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàSince KFLOP handles all motion Mach3 doesn't need to know what type of Spindle is connected and how.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàIt just sends logical commands of speed, on, off, direction and the Plugin+KFLOP is expected to make it happen.
> > > > > > > > > >
> > > > > > > > > > If your C Program contains diagnostic printout messages you can look at the KMotion Console Screen to see exactly if/what messages, speeds, directions, KFLOP is receiving.
> > > > > > > > > >
> > > > > > > > > > If you still have problems post your Mach3 XML file and Spindle C program so we can check it.
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > HTH
> > > > > > > > > > Regards
> > > > > > > > > > TK
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > ________________________________
> > > > > > > > > > From: Steve <steve@>
> > > > > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > > > > Sent: Monday, April 29, 2013 4:09 AM
> > > > > > > > > > Subject: [DynoMotion] Mach3 servo spindle - no direction change
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > > > > Using example SpindleMach3Jog.c with MACH3/KFLOP
> > > > > > > > > >
> > > > > > > > > > MACH3 set up with Step/Dir spindle
> > > > > > > > > >
> > > > > > > > > > Spindle motor runs, but there is no direction change. Testing the Kflop default spindle dir pin (hardware) shows it to be functional, but there is no dir change signal coming off the pin.
> > > > > > > > > >
> > > > > > > > > > Documentation and forum search do not have an answer that I can find.
> > > > > > > > > >
> > > > > > > > > > The plug-in config has a setting for 0=msg 1=dir 2=speed. Any setting other then 0 leaves spindle inoperative. What is the purpose of this setting? Is there any documentation?
> > > > > > > > > >
> > > > > > > > > > Thanks,
> > > > > > > > > >
> > > > > > > > > > -Steve
> > > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
|
|
Group: DynoMotion |
Message: 7462 |
From: Tom Kerekes |
Date: 5/14/2013 |
Subject: Re: Mach3 servo spindle - no direction change |
Hi Steve,
I've been able to duplicate this also. Not sure why Mach3 does this. I'm thinking your original approach with remembering if the Spindle is on or off is better. I've modified the program to do so using persist Variable #3 to remember the previous state. See attached.
Regards TK
Group: DynoMotion |
Message: 7464 |
From: tapiolarikka |
Date: 5/14/2013 |
Subject: Re: Mach3 servo spindle - no direction change |
Hi Tom/Steve,
I spent half a day tinkering with this same issue, spindle on with speed change after start up.
Downside of my today's effort is messed up my working spindlemachjog.c. Only this time I was smart enough to make a copy before I started...
As upside I count noticing that for some reason Mach remembers what ever was on the speed dro when shut down, and that first speed message comes with direction=0.
Rgds,
Tapio
--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Steve,
>
> I've been able to duplicate this also. Not sure why Mach3 does this. I'm thinking your original approach with remembering if the Spindle is on or off is better. I've modified the program to do so using persist Variable #3 to remember the previous state. See attached.
>
> Regards
> TK
>
>
>
> ________________________________
> From: Steve <steve@...>
> To: DynoMotion@yahoogroups.com
> Sent: Tuesday, May 14, 2013 6:56 AM
> Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
>
>
>
> Â
> The unexpected spindle ON with any speed change input is still present when MACH is first started. Once this initial toggle is passed, the solution works .
>
> I'm just posting this as a head's up as it is definately something to be aware of and is potentially dangerous.
>
> I will try putting an M5 in the reset and/or a 'Jog 0' command in the Kflop init and see if either of these will correctly set the system status on startup so that a speed change does not cause the unexpected spindle start.
>
> - Steve
>
> --- In DynoMotion@yahoogroups.com, "Steve" <steve@> wrote:
> >
> > Correction:
> >
> > Direction -1 is reported by MACH for spindle OFF condition. Sorry for typo. Program is correct.
> >
> > --- In DynoMotion@yahoogroups.com, "Steve" <steve@> wrote:
> > >
> > >
> > >
> > >
> > > Tom explained that MACH reports a direction of -1 if the spindle is currently in the ON state, so using that param may be more reliable . . provided MACH does not change the way the param works.
> > >
> > > A variation of the program that uses this method is available here:
> > >
> > > http://www.thecubestudio.com/Kflop/SpindleMach3JogSimpsonRev1.htm
> > >
> > > There are only a couple of line to add to the standard sample program and they are shown in red.
> > >
> > > - Steve
> > >
> > >
> > > --- In DynoMotion@yahoogroups.com, "Steve" <steve@> wrote:
> > > >
> > > >
> > > >
> > > > I'm told that my use of the 'new' rich text editor (to highlight the progtram changes) may have caused the error. At the bottom of this post is a link to the program with the lines that I added or changed highlighted in red. I don't know much about Yahoo, but hopefully the link will work.
> > > >
> > > > The fundamental change is approach is to track the state of the spindle and only do a 'live' speed change iof the spindle is alrady running.
> > > >
> > > > Spindle ON commands (M3 M4) have separate instruction strings.
> > > >
> > > > There may be an elegant way to determine the spindle state, but absent a programmers reference, the down and dirty solutionwas to create a volatile variable and update it locally on each stae change. The variable ('SpindleIsRunning')is then used to condition the response to a speed change command.
> > > >
> > > > Use my example to add the lines to the SpindleMach3Jog.c sample file that comes with the Kflop. Make sure you enter channel/axis number and other params that are correct for your system.
> > > >
> > > > Rename it to something specific to your setup to keep the original example fiel intact and enter the new file name in the plug-in configuration.
> > > >
> > > > I have a custom speed 'slider' control on my screen along with buttons for cw, ccw and spindle stop. All are working properly with the modified program in the link above. G-code also works correctly.
> > > >
> > > > http://www.thecubestudio.com/Kflop/SpindleMach3JogSimpson.htm
> > > >
> > > > - Steve
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > >
> > > > > Hi Steve,
> > > > >
> > > > > Please email it to me and I'll upload it.
> > > > >
> > > > > Thanks
> > > > > TK
> > > > >
> > > > >
> > > > >
> > > > > ________________________________
> > > > > From: Steve <steve@>
> > > > > To: DynoMotion@yahoogroups.com
> > > > > Sent: Friday, May 3, 2013 12:27 AM
> > > > > Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
> > > > >
> > > > >
> > > > >
> > > > > ÃÂ
> > > > > Tom,
> > > > >
> > > > > I tried to post the program, but an error message was thrown up saying that the request could not be completed.
> > > > >
> > > > > =Steve
> > > > >
> > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > >
> > > > > > Hi Steve,
> > > > > >
> > > > > > Could you post your Spindle Program with the bug fixed.ÃâàIt would help solve a problem Tapio is having.
> > > > > >
> > > > > > Thanks
> > > > > > TK
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > ________________________________
> > > > > > From: Steve <steve@>
> > > > > > To: DynoMotion@yahoogroups.com
> > > > > > Sent: Tuesday, April 30, 2013 5:08 AM
> > > > > > Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
> > > > > >
> > > > > >
> > > > > >
> > > > > > ÃâÃÂ
> > > > > >
> > > > > >
> > > > > > I clarified the work-arounds (aka 'hacks') because you asked about them. They have no effect on the issue in any case, but to answer your question; for testing, everything is box-stock. No mods, work-arounds, custom screens or anything non-standard at all.
> > > > > >
> > > > > > Only the Kflop device is 'new' to me. I am not a novice and I understand establishing a base-line.
> > > > > >
> > > > > > I seem to have everything working now including my custom screen buttons that control the spindle. The solution for my application was to make changes to the spindle jog program.
> > > > > >
> > > > > > What I think is a significant problem in the sample program is the unconditional start of the spindle with a speed change input. If the speed command ('Sxxx')comes befor the Spindle ON command (M4, M3)the net result is an unexpected spindle start which is potentially very dangerous. Just my 2 cents worth. Take it as you like.
> > > > > >
> > > > > > I have solved this by making the Speed changing 'jog' conditional on the spindle being ON at the time of the speed change. If the spindle is OFF, a speed change updates the parameter but does not start the spindle.
> > > > > >
> > > > > > Thanks very much for the prompt replies and suggestions.
> > > > > >
> > > > > > - Steve
> > > > > >
> > > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > > >
> > > > > > > Hi Steve,
> > > > > > >
> > > > > > > You can of course do whatever you wish when you are not trying to troubleshoot problems, but it would be less confusing if the "hacks" were removed when testing.ÃÆ'ââ¬Å¡ÃâàWere the hacks removed when you performed the tests?
> > > > > > >
> > > > > > > Strange.ÃÆ'ââ¬Å¡ÃâàHaving M5 send no message is the exact behavior when Disable Spindle Relays is checked.ÃÆ'ââ¬Å¡ÃâàYou might double check that.
> > > > > > >
> > > > > > > Please send the requested files.
> > > > > > >
> > > > > > > Regards
> > > > > > > TK
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > ________________________________
> > > > > > > From: Steve <steve@>
> > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > Sent: Monday, April 29, 2013 7:38 PM
> > > > > > > Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > My M3 and M4 'hacks' are work arounds so that the machine can do useful work. I switched over to a new computer with the Kflop on a machine that has to make parts for a living, so I can only do testing between runs. I will remove the 'hacks' and the patched in dir pin when we resolve the problem with the plug-in.
> > > > > > >
> > > > > > > FWIW, the new computer is all Intel (except the memory sticks). Intel processor, Intel Motherboard, and Intel SSD. Fresh install Win7 Pro 32 bit. There is nothing on this computer except Windows and MACH3. No antivirus, etc. nothing.
> > > > > > >
> > > > > > > TESTING RESULTS:
> > > > > > >
> > > > > > > Typed into MACH's screen 2 manual input line, M3 and M4 result in the following messages on the concole:
> > > > > > >
> > > > > > > Mach3 Notify Message 3, Direction = 1, Spindle set to xxxxxx
> > > > > > > Spindle CCW ON
> > > > > > > - and -
> > > > > > > Mach3 Notify Message 3, Direction = 0, Spindle set to xxxxxx
> > > > > > > Spindle CW ON
> > > > > > >
> > > > > > > Speed command 'Sxxxx' results in:
> > > > > > > Mach3 Notify Message 5, Direction = x, Spindle set to xxxxxx
> > > > > > > Spindle Speed Set To xxxxxxx
> > > > > > >
> > > > > > > In each of the above cases, there is an expected actual result; a direction change or speed change.
> > > > > > >
> > > > > > > Entry of M5 has no result. No message. ZIP. NADA. and of course no actual result.
> > > > > > >
> > > > > > > As I surmised, M5 is either not being sent by MACH, or the plug-in is not recognising it.
> > > > > > >
> > > > > > > = Steve
> > > > > > >
> > > > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > > > >
> > > > > > > > Hi Steve,
> > > > > > > >
> > > > > > > > Thanks.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàHaving a working hardware output pin and having KFLOP Configured to use a Step/Dir Generator to use that pin in the TTL or Open collector modes are two different things is the reason we asked.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàIt also wasn't clear if that was working reliably.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàBut now it is clear.
> > > > > > > >
> > > > > > > > You of course should not need to change the M3 M4 macros to change the direction.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàSo it would probably be best to remove that and find the real issue.
> > > > > > > >
> > > > > > > > Please check the Console in the manner I described and also post the requested files.
> > > > > > > >
> > > > > > > > Regards
> > > > > > > > TK
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > ________________________________
> > > > > > > > From: Steve <steve@>
> > > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > > Sent: Monday, April 29, 2013 3:42 PM
> > > > > > > > Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > > I mentioned in the OP that the pin functions normally, but if you need specifics, then yes the pin goes high and low when the box is checked in the digital I/O screen, the jog3 test that you asked for works fine, and as I also said, the direction is changing now, although not reliably. I have already done all of that.
> > > > > > > >
> > > > > > > > In fact I have a work around wherein I added an output to MACH and puta call in the M3 and M4 macros to toggle the output. I am using that output to change dir on the drive.
> > > > > > > > This is a MACH spindle problem and the remaining issue is that the spindle does not turn ON and OFF, which I believe is a different problem from the dir change. I have not been able to figure out a work around for the ON/OFF problem.
> > > > > > > >
> > > > > > > > I can see that the C programs are printing, but there is never any message on the MACH screen, so I will assume it is printing to the console and take a peek to see if there are any clues and let you know.
> > > > > > > >
> > > > > > > > - Steve
> > > > > > > >
> > > > > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > > > > >
> > > > > > > > > Hi Steve,
> > > > > > > > >
> > > > > > > > > Please perform the tests described in the previous email.ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàThe idea of testing from the KMotion Console is not to test if the Spindle Runs, but rather if the direction changes properly and reliably.
> > > > > > > > >
> > > > > > > > > If that works reliably use the KMotion Console to check if the Mach3 messages are getting to KFLOP properly.ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàYou will need to report back to us: What you commanded in Mach3, what was printed in the Console, and what happened.ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàIt would also be helpful to look at the Digital IO Screen to see if your Dir Bit is high or low in each step.
> > > > > > > > >
> > > > > > > > > If you still can't figure it out attach the Spindle Mach3 C Program, your Init C Program, and your Mach3 XML file (with the standard screen set selected) so we can check them.
> > > > > > > > >
> > > > > > > > > Regards
> > > > > > > > > TK
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > ________________________________
> > > > > > > > > From: Steve <steve@>
> > > > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > > > Sent: Monday, April 29, 2013 1:16 PM
> > > > > > > > > Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > > > Tried checked and uncheched. No joy. Tried standard MACH screens; no joy.
> > > > > > > > >
> > > > > > > > > Tried the production version of the plugin; same behavior.
> > > > > > > > >
> > > > > > > > > ON/OFF commands are either not getting to the plugin, or are in the wrong format perhaps?
> > > > > > > > >
> > > > > > > > > If it matters, I am running 6 axis plus the spindle. The spindle axis (axis 6) is set up in the init file like all of the other axis.
> > > > > > > > >
> > > > > > > > > responds to speed changes and sporatically to M3 and M4 . . never responds to M5, which simply contains DoSpinStop()
> > > > > > > > >
> > > > > > > > > - Steve
> > > > > > > > >
> > > > > > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > > > > > >
> > > > > > > > > > Hi Steve,
> > > > > > > > > >
> > > > > > > > > > I think that the Mach3 option "Disable Spindle Relays" needs to be un-checked.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàOtherwise Mach3 doesn't send Spindle off to the Plugin for some reason.
> > > > > > > > > >
> > > > > > > > > > Regards
> > > > > > > > > > TK
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > ________________________________
> > > > > > > > > > From: Steve <steve@>
> > > > > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > > > > Sent: Monday, April 29, 2013 11:21 AM
> > > > > > > > > > Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > > > > Note: The spindle DOES run, so the step signal is present, and I am checking for a dir signal on the Spindle DIR wire from the Kflop.
> > > > > > > > > >
> > > > > > > > > > I set up a step/dit spindle in the MACH config because the axis are configured within MACH.
> > > > > > > > > >
> > > > > > > > > > By removing the spindle from MACHs configuration, the M3 and M4 macros now change direction.
> > > > > > > > > >
> > > > > > > > > > However, M5 has no effect and the spindle starts as soon as a speed is entered and there is no way to shut it off except to enter a speed of zero.
> > > > > > > > > >
> > > > > > > > > > This is entering commands via MACHs MDI interface.
> > > > > > > > > >
> > > > > > > > > > It does not appear that ON/Off are being send or received. The spindle is locked ON at all times and responds only to speed (and now to direction via M3 and M4)
> > > > > > > > > >
> > > > > > > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > > > > > > >
> > > > > > > > > > > Hi Steve,
> > > > > > > > > > >
> > > > > > > > > > > First test the hardware and KFLOP configuration by Jogging the Spindle Axis both directions from the KMotion.exe Console Screen with something like Jog3=10000 and Jog3=-10000.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàDoes the axis move both ways?
> > > > > > > > > > >
> > > > > > > > > > > Our Plugin receives a Message (command action code), Direction, and Speed info from Mach3 which it writes into KFLOP before launching the spindle C program in KFLOP.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàThe Var parameter specifies which 3 consecutive UserData Variables in KFLOP the information will be
> placed.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàSo for example Var is typically configured to be 0, so the 3 pieces of information are placed into Variables 0, 1, and 2.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàThe Plugin
> > > > > Configuration and the way the C Program is written where to expect to find the data must match.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàOtherwise the C Program will use invalid data and things wont work at all.
> > > > > > > > > > >
> > > > > > > > > > > I'm not sure what you mean by:ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡Ãâà"MACH3 set up with Step/Dir spindle"ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàSince KFLOP handles all motion Mach3 doesn't need to know what type of Spindle is connected and
> how.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàIt just sends logical commands of speed, on, off, direction and the Plugin+KFLOP is expected to make it happen.
> > > > > > > > > > >
> > > > > > > > > > > If your C Program contains diagnostic printout messages you can look at the KMotion Console Screen to see exactly if/what messages, speeds, directions, KFLOP is receiving.
> > > > > > > > > > >
> > > > > > > > > > > If you still have problems post your Mach3 XML file and Spindle C program so we can check it.
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > HTH
> > > > > > > > > > > Regards
> > > > > > > > > > > TK
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > ________________________________
> > > > > > > > > > > From: Steve <steve@>
> > > > > > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > > > > > Sent: Monday, April 29, 2013 4:09 AM
> > > > > > > > > > > Subject: [DynoMotion] Mach3 servo spindle - no direction change
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > > > > > Using example SpindleMach3Jog.c with MACH3/KFLOP
> > > > > > > > > > >
> > > > > > > > > > > MACH3 set up with Step/Dir spindle
> > > > > > > > > > >
> > > > > > > > > > > Spindle motor runs, but there is no direction change. Testing the Kflop default spindle dir pin (hardware) shows it to be functional, but there is no dir change signal coming off the pin.
> > > > > > > > > > >
> > > > > > > > > > > Documentation and forum search do not have an answer that I can find.
> > > > > > > > > > >
> > > > > > > > > > > The plug-in config has a setting for 0=msg 1=dir 2=speed. Any setting other then 0 leaves spindle inoperative. What is the purpose of this setting? Is there any documentation?
> > > > > > > > > > >
> > > > > > > > > > > Thanks,
> > > > > > > > > > >
> > > > > > > > > > > -Steve
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
|
|
Group: DynoMotion |
Message: 7465 |
From: Tom Kerekes |
Date: 5/14/2013 |
Subject: Re: Mach3 servo spindle - no direction change |
Hi Tapio, I don't understand what you are saying. Did you try my solution? Does it work for you? Or would you like me to change your file for you? Regards TK
Group: DynoMotion |
Message: 7466 |
From: tapiolarikka |
Date: 5/14/2013 |
Subject: Re: Mach3 servo spindle - no direction change |
Hi Tom!
I didn't try your solution yet, I just found it, going through my e-mails. I'll try it first thing tomorrow morning.
I meant that it looks like mach does not actively set the speed/spindle-on to zero at start up.
Rgds,
Tapio
--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Tapio,
>
> I don't understand what you are saying. Did you try my solution? Does it work for you? Or would you like me to change your file for you?
>
> Regards
> TK
>
>
>
>
> ________________________________
> From: tapiolarikka <tapio.larikka@...>
> To: DynoMotion@yahoogroups.com
> Sent: Tuesday, May 14, 2013 12:38 PM
> Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
>
>
>
> Â
> Hi Tom/Steve,
>
> I spent half a day tinkering with this same issue, spindle on with speed change after start up.
> Downside of my today's effort is messed up my working spindlemachjog.c. Only this time I was smart enough to make a copy before I started...
> As upside I count noticing that for some reason Mach remembers what ever was on the speed dro when shut down, and that first speed message comes with direction=0.
>
> Rgds,
> Tapio
>
> --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> >
> > Hi Steve,
> >
> > I've been able to duplicate this also.ÃÂ Not sure why Mach3 does this.ÃÂ I'm thinking your original approach with remembering if the Spindle is on or off is better.ÃÂ I've modified the program to do so using persist Variable #3 to remember the previous state.ÃÂ See attached.
> >
> > Regards
> > TK
> >
> >
> >
> > ________________________________
> > From: Steve <steve@>
> > To: DynoMotion@yahoogroups.com
> > Sent: Tuesday, May 14, 2013 6:56 AM
> > Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
> >
> >
> >
> > ÃÂ
> > The unexpected spindle ON with any speed change input is still present when MACH is first started. Once this initial toggle is passed, the solution works .
> >
> > I'm just posting this as a head's up as it is definately something to be aware of and is potentially dangerous.
> >
> > I will try putting an M5 in the reset and/or a 'Jog 0' command in the Kflop init and see if either of these will correctly set the system status on startup so that a speed change does not cause the unexpected spindle start.
> >
> > - Steve
> >
> > --- In DynoMotion@yahoogroups.com, "Steve" <steve@> wrote:
> > >
> > > Correction:
> > >
> > > Direction -1 is reported by MACH for spindle OFF condition. Sorry for typo. Program is correct.
> > >
> > > --- In DynoMotion@yahoogroups.com, "Steve" <steve@> wrote:
> > > >
> > > >
> > > >
> > > >
> > > > Tom explained that MACH reports a direction of -1 if the spindle is currently in the ON state, so using that param may be more reliable . . provided MACH does not change the way the param works.
> > > >
> > > > A variation of the program that uses this method is available here:
> > > >
> > > > http://www.thecubestudio.com/Kflop/SpindleMach3JogSimpsonRev1.htm
> > > >
> > > > There are only a couple of line to add to the standard sample program and they are shown in red.
> > > >
> > > > - Steve
> > > >
> > > >
> > > > --- In DynoMotion@yahoogroups.com, "Steve" <steve@> wrote:
> > > > >
> > > > >
> > > > >
> > > > > I'm told that my use of the 'new' rich text editor (to highlight the progtram changes) may have caused the error. At the bottom of this post is a link to the program with the lines that I added or changed highlighted in red. I don't know much about Yahoo, but hopefully the link will work.
> > > > >
> > > > > The fundamental change is approach is to track the state of the spindle and only do a 'live' speed change iof the spindle is alrady running.
> > > > >
> > > > > Spindle ON commands (M3 M4) have separate instruction strings.
> > > > >
> > > > > There may be an elegant way to determine the spindle state, but absent a programmers reference, the down and dirty solutionwas to create a volatile variable and update it locally on each stae change. The variable ('SpindleIsRunning')is then used to condition the response to a speed change command.
> > > > >
> > > > > Use my example to add the lines to the SpindleMach3Jog.c sample file that comes with the Kflop. Make sure you enter channel/axis number and other params that are correct for your system.
> > > > >
> > > > > Rename it to something specific to your setup to keep the original example fiel intact and enter the new file name in the plug-in configuration.
> > > > >
> > > > > I have a custom speed 'slider' control on my screen along with buttons for cw, ccw and spindle stop. All are working properly with the modified program in the link above. G-code also works correctly.
> > > > >
> > > > > http://www.thecubestudio.com/Kflop/SpindleMach3JogSimpson.htm
> > > > >
> > > > > - Steve
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > >
> > > > > > Hi Steve,
> > > > > >
> > > > > > Please email it to me and I'll upload it.
> > > > > >
> > > > > > Thanks
> > > > > > TK
> > > > > >
> > > > > >
> > > > > >
> > > > > > ________________________________
> > > > > > From: Steve <steve@>
> > > > > > To: DynoMotion@yahoogroups.com
> > > > > > Sent: Friday, May 3, 2013 12:27 AM
> > > > > > Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
> > > > > >
> > > > > >
> > > > > >
> > > > > > ÃâÃÂ
> > > > > > Tom,
> > > > > >
> > > > > > I tried to post the program, but an error message was thrown up saying that the request could not be completed.
> > > > > >
> > > > > > =Steve
> > > > > >
> > > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > > >
> > > > > > > Hi Steve,
> > > > > > >
> > > > > > > Could you post your Spindle Program with the bug fixed.ÃÆ'ââ¬Å¡ÃâàIt would help solve a problem Tapio is having.
> > > > > > >
> > > > > > > Thanks
> > > > > > > TK
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > ________________________________
> > > > > > > From: Steve <steve@>
> > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > Sent: Tuesday, April 30, 2013 5:08 AM
> > > > > > > Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > >
> > > > > > >
> > > > > > > I clarified the work-arounds (aka 'hacks') because you asked about them. They have no effect on the issue in any case, but to answer your question; for testing, everything is box-stock. No mods, work-arounds, custom screens or anything non-standard at all.
> > > > > > >
> > > > > > > Only the Kflop device is 'new' to me. I am not a novice and I understand establishing a base-line.
> > > > > > >
> > > > > > > I seem to have everything working now including my custom screen buttons that control the spindle. The solution for my application was to make changes to the spindle jog program.
> > > > > > >
> > > > > > > What I think is a significant problem in the sample program is the unconditional start of the spindle with a speed change input. If the speed command ('Sxxx')comes befor the Spindle ON command (M4, M3)the net result is an unexpected spindle start which is potentially very dangerous. Just my 2 cents worth. Take it as you like.
> > > > > > >
> > > > > > > I have solved this by making the Speed changing 'jog' conditional on the spindle being ON at the time of the speed change. If the spindle is OFF, a speed change updates the parameter but does not start the spindle.
> > > > > > >
> > > > > > > Thanks very much for the prompt replies and suggestions.
> > > > > > >
> > > > > > > - Steve
> > > > > > >
> > > > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > > > >
> > > > > > > > Hi Steve,
> > > > > > > >
> > > > > > > > You can of course do whatever you wish when you are not trying to troubleshoot problems, but it would be less confusing if the "hacks" were removed when testing.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàWere the hacks removed when you performed the tests?
> > > > > > > >
> > > > > > > > Strange.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàHaving M5 send no message is the exact behavior when Disable Spindle Relays is checked.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàYou might double check that.
> > > > > > > >
> > > > > > > > Please send the requested files.
> > > > > > > >
> > > > > > > > Regards
> > > > > > > > TK
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > ________________________________
> > > > > > > > From: Steve <steve@>
> > > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > > Sent: Monday, April 29, 2013 7:38 PM
> > > > > > > > Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > > My M3 and M4 'hacks' are work arounds so that the machine can do useful work. I switched over to a new computer with the Kflop on a machine that has to make parts for a living, so I can only do testing between runs. I will remove the 'hacks' and the patched in dir pin when we resolve the problem with the plug-in.
> > > > > > > >
> > > > > > > > FWIW, the new computer is all Intel (except the memory sticks). Intel processor, Intel Motherboard, and Intel SSD. Fresh install Win7 Pro 32 bit. There is nothing on this computer except Windows and MACH3. No antivirus, etc. nothing.
> > > > > > > >
> > > > > > > > TESTING RESULTS:
> > > > > > > >
> > > > > > > > Typed into MACH's screen 2 manual input line, M3 and M4 result in the following messages on the concole:
> > > > > > > >
> > > > > > > > Mach3 Notify Message 3, Direction = 1, Spindle set to xxxxxx
> > > > > > > > Spindle CCW ON
> > > > > > > > - and -
> > > > > > > > Mach3 Notify Message 3, Direction = 0, Spindle set to xxxxxx
> > > > > > > > Spindle CW ON
> > > > > > > >
> > > > > > > > Speed command 'Sxxxx' results in:
> > > > > > > > Mach3 Notify Message 5, Direction = x, Spindle set to xxxxxx
> > > > > > > > Spindle Speed Set To xxxxxxx
> > > > > > > >
> > > > > > > > In each of the above cases, there is an expected actual result; a direction change or speed change.
> > > > > > > >
> > > > > > > > Entry of M5 has no result. No message. ZIP. NADA. and of course no actual result.
> > > > > > > >
> > > > > > > > As I surmised, M5 is either not being sent by MACH, or the plug-in is not recognising it.
> > > > > > > >
> > > > > > > > = Steve
> > > > > > > >
> > > > > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > > > > >
> > > > > > > > > Hi Steve,
> > > > > > > > >
> > > > > > > > > Thanks.ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàHaving a working hardware output pin and having KFLOP Configured to use a Step/Dir Generator to use that pin in the TTL or Open collector modes are two different things is the reason we asked.ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàIt also wasn't clear if that was working reliably.ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàBut now it is clear.
> > > > > > > > >
> > > > > > > > > You of course should not need to change the M3 M4 macros to change the direction.ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàSo it would probably be best to remove that and find the real issue.
> > > > > > > > >
> > > > > > > > > Please check the Console in the manner I described and also post the requested files.
> > > > > > > > >
> > > > > > > > > Regards
> > > > > > > > > TK
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > ________________________________
> > > > > > > > > From: Steve <steve@>
> > > > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > > > Sent: Monday, April 29, 2013 3:42 PM
> > > > > > > > > Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > > > I mentioned in the OP that the pin functions normally, but if you need specifics, then yes the pin goes high and low when the box is checked in the digital I/O screen, the jog3 test that you asked for works fine, and as I also said, the direction is changing now, although not reliably. I have already done all of that.
> > > > > > > > >
> > > > > > > > > In fact I have a work around wherein I added an output to MACH and puta call in the M3 and M4 macros to toggle the output. I am using that output to change dir on the drive.
> > > > > > > > > This is a MACH spindle problem and the remaining issue is that the spindle does not turn ON and OFF, which I believe is a different problem from the dir change. I have not been able to figure out a work around for the ON/OFF problem.
> > > > > > > > >
> > > > > > > > > I can see that the C programs are printing, but there is never any message on the MACH screen, so I will assume it is printing to the console and take a peek to see if there are any clues and let you know.
> > > > > > > > >
> > > > > > > > > - Steve
> > > > > > > > >
> > > > > > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > > > > > >
> > > > > > > > > > Hi Steve,
> > > > > > > > > >
> > > > > > > > > > Please perform the tests described in the previous email.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàThe idea of testing from the KMotion Console is not to test if the Spindle Runs, but rather if the direction changes properly and reliably.
> > > > > > > > > >
> > > > > > > > > > If that works reliably use the KMotion Console to check if the Mach3 messages are getting to KFLOP properly.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàYou will need to report back to us: What you commanded in Mach3, what was printed in the Console, and what happened.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàIt would also be helpful to look at the Digital IO Screen to see if your Dir Bit is high or low in each step.
> > > > > > > > > >
> > > > > > > > > > If you still can't figure it out attach the Spindle Mach3 C Program, your Init C Program, and your Mach3 XML file (with the standard screen set selected) so we can check them.
> > > > > > > > > >
> > > > > > > > > > Regards
> > > > > > > > > > TK
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > ________________________________
> > > > > > > > > > From: Steve <steve@>
> > > > > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > > > > Sent: Monday, April 29, 2013 1:16 PM
> > > > > > > > > > Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > > > > Tried checked and uncheched. No joy. Tried standard MACH screens; no joy.
> > > > > > > > > >
> > > > > > > > > > Tried the production version of the plugin; same behavior.
> > > > > > > > > >
> > > > > > > > > > ON/OFF commands are either not getting to the plugin, or are in the wrong format perhaps?
> > > > > > > > > >
> > > > > > > > > > If it matters, I am running 6 axis plus the spindle. The spindle axis (axis 6) is set up in the init file like all of the other axis.
> > > > > > > > > >
> > > > > > > > > > responds to speed changes and sporatically to M3 and M4 . . never responds to M5, which simply contains DoSpinStop()
> > > > > > > > > >
> > > > > > > > > > - Steve
> > > > > > > > > >
> > > > > > > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > > > > > > >
> > > > > > > > > > > Hi Steve,
> > > > > > > > > > >
> > > > > > > > > > > I think that the Mach3 option "Disable Spindle Relays" needs to be un-checked.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàOtherwise Mach3 doesn't send Spindle off to the Plugin for some reason.
> > > > > > > > > > >
> > > > > > > > > > > Regards
> > > > > > > > > > > TK
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > ________________________________
> > > > > > > > > > > From: Steve <steve@>
> > > > > > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > > > > > Sent: Monday, April 29, 2013 11:21 AM
> > > > > > > > > > > Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > > > > > Note: The spindle DOES run, so the step signal is present, and I am checking for a dir signal on the Spindle DIR wire from the Kflop.
> > > > > > > > > > >
> > > > > > > > > > > I set up a step/dit spindle in the MACH config because the axis are configured within MACH.
> > > > > > > > > > >
> > > > > > > > > > > By removing the spindle from MACHs configuration, the M3 and M4 macros now change direction.
> > > > > > > > > > >
> > > > > > > > > > > However, M5 has no effect and the spindle starts as soon as a speed is entered and there is no way to shut it off except to enter a speed of zero.
> > > > > > > > > > >
> > > > > > > > > > > This is entering commands via MACHs MDI interface.
> > > > > > > > > > >
> > > > > > > > > > > It does not appear that ON/Off are being send or received. The spindle is locked ON at all times and responds only to speed (and now to direction via M3 and M4)
> > > > > > > > > > >
> > > > > > > > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > > > > > > > >
> > > > > > > > > > > > Hi Steve,
> > > > > > > > > > > >
> > > > > > > > > > > > First test the hardware and KFLOP configuration by Jogging the Spindle Axis both directions from the KMotion.exe Console Screen with something like Jog3=10000 and Jog3=-10000.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâà'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬ÃâæÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàDoes the
> axis move both ways?
> > > > > > > > > > > >
> > > > > > > > > > > > Our Plugin receives a Message (command action code), Direction, and Speed info from Mach3 which it writes into KFLOP before launching the spindle C program in KFLOP.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâà'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬ÃâæÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàThe Var parameter
> specifies which 3 consecutive UserData Variables in KFLOP the information will be
> > placed.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâà'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬ÃâæÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàSo for example Var is typically configured to be 0, so the 3 pieces of information are placed into Variables 0, 1, and
> 2.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâà'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬ÃâæÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàThe Plugin
> > > > > > Configuration and the way the C Program is written where to expect to find the data must match.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâà'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬ÃâæÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàOtherwise the C Program will use invalid data and things wont work at all.
> > > > > > > > > > > >
> > > > > > > > > > > > I'm not sure what you mean by:ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâà'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬ÃâæÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡Ãâà"MACH3 set up with Step/Dir
> spindle"ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâà'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬ÃâæÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàSince KFLOP handles all motion Mach3 doesn't need to know what type of Spindle is connected and
> > how.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâà'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬ÃâæÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàIt just sends logical commands of speed, on, off, direction and the Plugin+KFLOP is expected to make it happen.
> > > > > > > > > > > >
> > > > > > > > > > > > If your C Program contains diagnostic printout messages you can look at the KMotion Console Screen to see exactly if/what messages, speeds, directions, KFLOP is receiving.
> > > > > > > > > > > >
> > > > > > > > > > > > If you still have problems post your Mach3 XML file and Spindle C program so we can check it.
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > > HTH
> > > > > > > > > > > > Regards
> > > > > > > > > > > > TK
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > > ________________________________
> > > > > > > > > > > > From: Steve <steve@>
> > > > > > > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > > > > > > Sent: Monday, April 29, 2013 4:09 AM
> > > > > > > > > > > > Subject: [DynoMotion] Mach3 servo spindle - no direction change
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > > ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâà'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬ÃâæÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > > > > > > Using example SpindleMach3Jog.c with MACH3/KFLOP
> > > > > > > > > > > >
> > > > > > > > > > > > MACH3 set up with Step/Dir spindle
> > > > > > > > > > > >
> > > > > > > > > > > > Spindle motor runs, but there is no direction change. Testing the Kflop default spindle dir pin (hardware) shows it to be functional, but there is no dir change signal coming off the pin.
> > > > > > > > > > > >
> > > > > > > > > > > > Documentation and forum search do not have an answer that I can find.
> > > > > > > > > > > >
> > > > > > > > > > > > The plug-in config has a setting for 0=msg 1=dir 2=speed. Any setting other then 0 leaves spindle inoperative. What is the purpose of this setting? Is there any documentation?
> > > > > > > > > > > >
> > > > > > > > > > > > Thanks,
> > > > > > > > > > > >
> > > > > > > > > > > > -Steve
> > > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
|
|
Group: DynoMotion |
Message: 7469 |
From: tapiolarikka |
Date: 5/15/2013 |
Subject: Re: Mach3 servo spindle - no direction change |
Hi Tom/Steve,
After yet an other day with the spindle I ended up with this:
#include "KMotionDef.h"
//Plugin Notifications and defines..
enum { EX_DDA , EX_VMS, EX_COMMAND, EX_SPINON, EX_SPINOFF, EX_SPINSPEED, EX_MOTORTUNED
, EX_SETUP, EX_FEEDHOLD, EX_RUN, EX_ESTOP , EX_CONFIG };
#define SPINDLE_AXIS 3 // axis set up as Spindle, possibly Step/Dir or Servo
#define FACTOR 226000.0 // Converts fractional pulley speed to counts/sec (may be negative)
main()
{
int message = persist.UserData[0]; // Mach3 message ID
int Direction = persist.UserData[1]; // Mach3 Spindle Direction
float speed = *(float *)&persist.UserData[2]; // value stored is actually a float
int *On = &persist.UserData[3]; // value stored is actually a float
int DirFactor = 0;
//if (Direction==0) DirFactor=-1; // change Direcion 0 or 1 to DirFactor -1 or +1
if (Direction==0)
{
DirFactor=1;
}
else if (Direction==1)
{
DirFactor=-1;
}
switch (message)
{
case EX_SPINSPEED:
DefineCoordSystem6(0,1,2,-1,-1,-1);
speed = *(float *)&persist.UserData[2]; // value stored is actually a float
printf("Mach3 Notify Message=%d, Direction=%2d, Spindle Set to %f, Run=%3d\n",message,Direction,speed,*On);
Jog(SPINDLE_AXIS,speed*FACTOR*DirFactor*(*On));
while (!CheckDone(SPINDLE_AXIS));
break;
case EX_SPINON:
*On = TRUE;
DefineCoordSystem6(0,1,2,-1,-1,-1);
printf("Mach3 Notify Message=%d, Direction=%2d, Spindle Set to %f, Run=%3d\n",message,Direction,speed,*On);
Jog(SPINDLE_AXIS,speed*FACTOR*DirFactor*(*On));
while (!CheckDone(SPINDLE_AXIS));
break;
case EX_SPINOFF:
*On = FALSE;
printf("Mach3 Notify Message=%d, Direction=%2d, Spindle Set to %f, Run=%3d\n",message,Direction,speed,*On);
Jog(SPINDLE_AXIS,0.0);
while(!CheckDone(SPINDLE_AXIS));
DefineCoordSystem6(0,1,2,3,-1,-1);
break;
}
}
With this my spindle works well enough:
- spins to both directions
- does not start with manual speed change
Last remaining wrinkle flaw that I can't iron out is that manual speed change excludes A-axis from coordinate system. If I take the
"DefineCoordSystem6(0,1,2,-1,-1,-1)" out of the "case EX_SPINSPEED:"
the spindle/A-axis does not get excluded from coord system, resulting
in A-axis following error.
I also found that with above g-code
S100
M3
F0.2
works, but
S100 F0.2
M3
does not work. Kflop tries to execute the code, but for some reason the spindle/A-axis does not get excluded from coord system, resulting
in A-axis following error.
What's even more odd is that it might work once or twice.
M3
S100 F0.2
works, but the feedrate is not handled correctly. This also makes the
spindle start at what ever speed happens to be in DRO.
Rgds,
Tapio
--- In DynoMotion@yahoogroups.com, "tapiolarikka" <tapio.larikka@...> wrote:
>
> Hi Tom!
>
> I didn't try your solution yet, I just found it, going through my e-mails. I'll try it first thing tomorrow morning.
>
> I meant that it looks like mach does not actively set the speed/spindle-on to zero at start up.
>
>
> Rgds,
> Tapio
>
> --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> >
> > Hi Tapio,
> >
> > I don't understand what you are saying. Did you try my solution? Does it work for you? Or would you like me to change your file for you?
> >
> > Regards
> > TK
> >
> >
> >
> >
> > ________________________________
> > From: tapiolarikka <tapio.larikka@>
> > To: DynoMotion@yahoogroups.com
> > Sent: Tuesday, May 14, 2013 12:38 PM
> > Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
> >
> >
> >
> > Â
> > Hi Tom/Steve,
> >
> > I spent half a day tinkering with this same issue, spindle on with speed change after start up.
> > Downside of my today's effort is messed up my working spindlemachjog.c. Only this time I was smart enough to make a copy before I started...
> > As upside I count noticing that for some reason Mach remembers what ever was on the speed dro when shut down, and that first speed message comes with direction=0.
> >
> > Rgds,
> > Tapio
> >
> > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > >
> > > Hi Steve,
> > >
> > > I've been able to duplicate this also.ÃÂ Not sure why Mach3 does this.ÃÂ I'm thinking your original approach with remembering if the Spindle is on or off is better.ÃÂ I've modified the program to do so using persist Variable #3 to remember the previous state.ÃÂ See attached.
> > >
> > > Regards
> > > TK
> > >
> > >
> > >
> > > ________________________________
> > > From: Steve <steve@>
> > > To: DynoMotion@yahoogroups.com
> > > Sent: Tuesday, May 14, 2013 6:56 AM
> > > Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
> > >
> > >
> > >
> > > ÃÂ
> > > The unexpected spindle ON with any speed change input is still present when MACH is first started. Once this initial toggle is passed, the solution works .
> > >
> > > I'm just posting this as a head's up as it is definately something to be aware of and is potentially dangerous.
> > >
> > > I will try putting an M5 in the reset and/or a 'Jog 0' command in the Kflop init and see if either of these will correctly set the system status on startup so that a speed change does not cause the unexpected spindle start.
> > >
> > > - Steve
> > >
> > > --- In DynoMotion@yahoogroups.com, "Steve" <steve@> wrote:
> > > >
> > > > Correction:
> > > >
> > > > Direction -1 is reported by MACH for spindle OFF condition. Sorry for typo. Program is correct.
> > > >
> > > > --- In DynoMotion@yahoogroups.com, "Steve" <steve@> wrote:
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > Tom explained that MACH reports a direction of -1 if the spindle is currently in the ON state, so using that param may be more reliable . . provided MACH does not change the way the param works.
> > > > >
> > > > > A variation of the program that uses this method is available here:
> > > > >
> > > > > http://www.thecubestudio.com/Kflop/SpindleMach3JogSimpsonRev1.htm
> > > > >
> > > > > There are only a couple of line to add to the standard sample program and they are shown in red.
> > > > >
> > > > > - Steve
> > > > >
> > > > >
> > > > > --- In DynoMotion@yahoogroups.com, "Steve" <steve@> wrote:
> > > > > >
> > > > > >
> > > > > >
> > > > > > I'm told that my use of the 'new' rich text editor (to highlight the progtram changes) may have caused the error. At the bottom of this post is a link to the program with the lines that I added or changed highlighted in red. I don't know much about Yahoo, but hopefully the link will work.
> > > > > >
> > > > > > The fundamental change is approach is to track the state of the spindle and only do a 'live' speed change iof the spindle is alrady running.
> > > > > >
> > > > > > Spindle ON commands (M3 M4) have separate instruction strings.
> > > > > >
> > > > > > There may be an elegant way to determine the spindle state, but absent a programmers reference, the down and dirty solutionwas to create a volatile variable and update it locally on each stae change. The variable ('SpindleIsRunning')is then used to condition the response to a speed change command.
> > > > > >
> > > > > > Use my example to add the lines to the SpindleMach3Jog.c sample file that comes with the Kflop. Make sure you enter channel/axis number and other params that are correct for your system.
> > > > > >
> > > > > > Rename it to something specific to your setup to keep the original example fiel intact and enter the new file name in the plug-in configuration.
> > > > > >
> > > > > > I have a custom speed 'slider' control on my screen along with buttons for cw, ccw and spindle stop. All are working properly with the modified program in the link above. G-code also works correctly.
> > > > > >
> > > > > > http://www.thecubestudio.com/Kflop/SpindleMach3JogSimpson.htm
> > > > > >
> > > > > > - Steve
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > > >
> > > > > > > Hi Steve,
> > > > > > >
> > > > > > > Please email it to me and I'll upload it.
> > > > > > >
> > > > > > > Thanks
> > > > > > > TK
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > ________________________________
> > > > > > > From: Steve <steve@>
> > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > Sent: Friday, May 3, 2013 12:27 AM
> > > > > > > Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > ÃâÃÂ
> > > > > > > Tom,
> > > > > > >
> > > > > > > I tried to post the program, but an error message was thrown up saying that the request could not be completed.
> > > > > > >
> > > > > > > =Steve
> > > > > > >
> > > > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > > > >
> > > > > > > > Hi Steve,
> > > > > > > >
> > > > > > > > Could you post your Spindle Program with the bug fixed.ÃÆ'ââ¬Å¡ÃâàIt would help solve a problem Tapio is having.
> > > > > > > >
> > > > > > > > Thanks
> > > > > > > > TK
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > ________________________________
> > > > > > > > From: Steve <steve@>
> > > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > > Sent: Tuesday, April 30, 2013 5:08 AM
> > > > > > > > Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > >
> > > > > > > >
> > > > > > > > I clarified the work-arounds (aka 'hacks') because you asked about them. They have no effect on the issue in any case, but to answer your question; for testing, everything is box-stock. No mods, work-arounds, custom screens or anything non-standard at all.
> > > > > > > >
> > > > > > > > Only the Kflop device is 'new' to me. I am not a novice and I understand establishing a base-line.
> > > > > > > >
> > > > > > > > I seem to have everything working now including my custom screen buttons that control the spindle. The solution for my application was to make changes to the spindle jog program.
> > > > > > > >
> > > > > > > > What I think is a significant problem in the sample program is the unconditional start of the spindle with a speed change input. If the speed command ('Sxxx')comes befor the Spindle ON command (M4, M3)the net result is an unexpected spindle start which is potentially very dangerous. Just my 2 cents worth. Take it as you like.
> > > > > > > >
> > > > > > > > I have solved this by making the Speed changing 'jog' conditional on the spindle being ON at the time of the speed change. If the spindle is OFF, a speed change updates the parameter but does not start the spindle.
> > > > > > > >
> > > > > > > > Thanks very much for the prompt replies and suggestions.
> > > > > > > >
> > > > > > > > - Steve
> > > > > > > >
> > > > > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > > > > >
> > > > > > > > > Hi Steve,
> > > > > > > > >
> > > > > > > > > You can of course do whatever you wish when you are not trying to troubleshoot problems, but it would be less confusing if the "hacks" were removed when testing.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàWere the hacks removed when you performed the tests?
> > > > > > > > >
> > > > > > > > > Strange.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàHaving M5 send no message is the exact behavior when Disable Spindle Relays is checked.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàYou might double check that.
> > > > > > > > >
> > > > > > > > > Please send the requested files.
> > > > > > > > >
> > > > > > > > > Regards
> > > > > > > > > TK
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > ________________________________
> > > > > > > > > From: Steve <steve@>
> > > > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > > > Sent: Monday, April 29, 2013 7:38 PM
> > > > > > > > > Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > > > My M3 and M4 'hacks' are work arounds so that the machine can do useful work. I switched over to a new computer with the Kflop on a machine that has to make parts for a living, so I can only do testing between runs. I will remove the 'hacks' and the patched in dir pin when we resolve the problem with the plug-in.
> > > > > > > > >
> > > > > > > > > FWIW, the new computer is all Intel (except the memory sticks). Intel processor, Intel Motherboard, and Intel SSD. Fresh install Win7 Pro 32 bit. There is nothing on this computer except Windows and MACH3. No antivirus, etc. nothing.
> > > > > > > > >
> > > > > > > > > TESTING RESULTS:
> > > > > > > > >
> > > > > > > > > Typed into MACH's screen 2 manual input line, M3 and M4 result in the following messages on the concole:
> > > > > > > > >
> > > > > > > > > Mach3 Notify Message 3, Direction = 1, Spindle set to xxxxxx
> > > > > > > > > Spindle CCW ON
> > > > > > > > > - and -
> > > > > > > > > Mach3 Notify Message 3, Direction = 0, Spindle set to xxxxxx
> > > > > > > > > Spindle CW ON
> > > > > > > > >
> > > > > > > > > Speed command 'Sxxxx' results in:
> > > > > > > > > Mach3 Notify Message 5, Direction = x, Spindle set to xxxxxx
> > > > > > > > > Spindle Speed Set To xxxxxxx
> > > > > > > > >
> > > > > > > > > In each of the above cases, there is an expected actual result; a direction change or speed change.
> > > > > > > > >
> > > > > > > > > Entry of M5 has no result. No message. ZIP. NADA. and of course no actual result.
> > > > > > > > >
> > > > > > > > > As I surmised, M5 is either not being sent by MACH, or the plug-in is not recognising it.
> > > > > > > > >
> > > > > > > > > = Steve
> > > > > > > > >
> > > > > > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > > > > > >
> > > > > > > > > > Hi Steve,
> > > > > > > > > >
> > > > > > > > > > Thanks.ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàHaving a working hardware output pin and having KFLOP Configured to use a Step/Dir Generator to use that pin in the TTL or Open collector modes are two different things is the reason we asked.ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàIt also wasn't clear if that was working reliably.ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàBut now it is clear.
> > > > > > > > > >
> > > > > > > > > > You of course should not need to change the M3 M4 macros to change the direction.ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàSo it would probably be best to remove that and find the real issue.
> > > > > > > > > >
> > > > > > > > > > Please check the Console in the manner I described and also post the requested files.
> > > > > > > > > >
> > > > > > > > > > Regards
> > > > > > > > > > TK
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > ________________________________
> > > > > > > > > > From: Steve <steve@>
> > > > > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > > > > Sent: Monday, April 29, 2013 3:42 PM
> > > > > > > > > > Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > > > > I mentioned in the OP that the pin functions normally, but if you need specifics, then yes the pin goes high and low when the box is checked in the digital I/O screen, the jog3 test that you asked for works fine, and as I also said, the direction is changing now, although not reliably. I have already done all of that.
> > > > > > > > > >
> > > > > > > > > > In fact I have a work around wherein I added an output to MACH and puta call in the M3 and M4 macros to toggle the output. I am using that output to change dir on the drive.
> > > > > > > > > > This is a MACH spindle problem and the remaining issue is that the spindle does not turn ON and OFF, which I believe is a different problem from the dir change. I have not been able to figure out a work around for the ON/OFF problem.
> > > > > > > > > >
> > > > > > > > > > I can see that the C programs are printing, but there is never any message on the MACH screen, so I will assume it is printing to the console and take a peek to see if there are any clues and let you know.
> > > > > > > > > >
> > > > > > > > > > - Steve
> > > > > > > > > >
> > > > > > > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > > > > > > >
> > > > > > > > > > > Hi Steve,
> > > > > > > > > > >
> > > > > > > > > > > Please perform the tests described in the previous email.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàThe idea of testing from the KMotion Console is not to test if the Spindle Runs, but rather if the direction changes properly and reliably.
> > > > > > > > > > >
> > > > > > > > > > > If that works reliably use the KMotion Console to check if the Mach3 messages are getting to KFLOP properly.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàYou will need to report back to us: What you commanded in Mach3, what was printed in the Console, and what happened.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàIt would also be helpful to look at the Digital IO Screen to see if your Dir Bit is high or low in each step.
> > > > > > > > > > >
> > > > > > > > > > > If you still can't figure it out attach the Spindle Mach3 C Program, your Init C Program, and your Mach3 XML file (with the standard screen set selected) so we can check them.
> > > > > > > > > > >
> > > > > > > > > > > Regards
> > > > > > > > > > > TK
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > ________________________________
> > > > > > > > > > > From: Steve <steve@>
> > > > > > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > > > > > Sent: Monday, April 29, 2013 1:16 PM
> > > > > > > > > > > Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > > > > > Tried checked and uncheched. No joy. Tried standard MACH screens; no joy.
> > > > > > > > > > >
> > > > > > > > > > > Tried the production version of the plugin; same behavior.
> > > > > > > > > > >
> > > > > > > > > > > ON/OFF commands are either not getting to the plugin, or are in the wrong format perhaps?
> > > > > > > > > > >
> > > > > > > > > > > If it matters, I am running 6 axis plus the spindle. The spindle axis (axis 6) is set up in the init file like all of the other axis.
> > > > > > > > > > >
> > > > > > > > > > > responds to speed changes and sporatically to M3 and M4 . . never responds to M5, which simply contains DoSpinStop()
> > > > > > > > > > >
> > > > > > > > > > > - Steve
> > > > > > > > > > >
> > > > > > > > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > > > > > > > >
> > > > > > > > > > > > Hi Steve,
> > > > > > > > > > > >
> > > > > > > > > > > > I think that the Mach3 option "Disable Spindle Relays" needs to be un-checked.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàOtherwise Mach3 doesn't send Spindle off to the Plugin for some reason.
> > > > > > > > > > > >
> > > > > > > > > > > > Regards
> > > > > > > > > > > > TK
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > > ________________________________
> > > > > > > > > > > > From: Steve <steve@>
> > > > > > > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > > > > > > Sent: Monday, April 29, 2013 11:21 AM
> > > > > > > > > > > > Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > > ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > > > > > > Note: The spindle DOES run, so the step signal is present, and I am checking for a dir signal on the Spindle DIR wire from the Kflop.
> > > > > > > > > > > >
> > > > > > > > > > > > I set up a step/dit spindle in the MACH config because the axis are configured within MACH.
> > > > > > > > > > > >
> > > > > > > > > > > > By removing the spindle from MACHs configuration, the M3 and M4 macros now change direction.
> > > > > > > > > > > >
> > > > > > > > > > > > However, M5 has no effect and the spindle starts as soon as a speed is entered and there is no way to shut it off except to enter a speed of zero.
> > > > > > > > > > > >
> > > > > > > > > > > > This is entering commands via MACHs MDI interface.
> > > > > > > > > > > >
> > > > > > > > > > > > It does not appear that ON/Off are being send or received. The spindle is locked ON at all times and responds only to speed (and now to direction via M3 and M4)
> > > > > > > > > > > >
> > > > > > > > > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > > > > > > > > >
> > > > > > > > > > > > > Hi Steve,
> > > > > > > > > > > > >
> > > > > > > > > > > > > First test the hardware and KFLOP configuration by Jogging the Spindle Axis both directions from the KMotion.exe Console Screen with something like Jog3=10000 and Jog3=-10000.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâà'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬ÃâæÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàDoes the
> > axis move both ways?
> > > > > > > > > > > > >
> > > > > > > > > > > > > Our Plugin receives a Message (command action code), Direction, and Speed info from Mach3 which it writes into KFLOP before launching the spindle C program in KFLOP.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâà'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬ÃâæÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàThe Var parameter
> > specifies which 3 consecutive UserData Variables in KFLOP the information will be
> > > placed.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâà'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬ÃâæÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàSo for example Var is typically configured to be 0, so the 3 pieces of information are placed into Variables 0, 1, and
> > 2.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâà'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬ÃâæÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàThe Plugin
> > > > > > > Configuration and the way the C Program is written where to expect to find the data must match.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâà'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬ÃâæÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàOtherwise the C Program will use invalid data and things wont work at all.
> > > > > > > > > > > > >
> > > > > > > > > > > > > I'm not sure what you mean by:ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâà'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬ÃâæÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡Ãâà"MACH3 set up with Step/Dir
> > spindle"ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâà'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬ÃâæÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàSince KFLOP handles all motion Mach3 doesn't need to know what type of Spindle is connected and
> > > how.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâà'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬ÃâæÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàIt just sends logical commands of speed, on, off, direction and the Plugin+KFLOP is expected to make it happen.
> > > > > > > > > > > > >
> > > > > > > > > > > > > If your C Program contains diagnostic printout messages you can look at the KMotion Console Screen to see exactly if/what messages, speeds, directions, KFLOP is receiving.
> > > > > > > > > > > > >
> > > > > > > > > > > > > If you still have problems post your Mach3 XML file and Spindle C program so we can check it.
> > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > > HTH
> > > > > > > > > > > > > Regards
> > > > > > > > > > > > > TK
> > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > > ________________________________
> > > > > > > > > > > > > From: Steve <steve@>
> > > > > > > > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > > > > > > > Sent: Monday, April 29, 2013 4:09 AM
> > > > > > > > > > > > > Subject: [DynoMotion] Mach3 servo spindle - no direction change
> > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > > ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâà'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬ÃâæÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > > > > > > > Using example SpindleMach3Jog.c with MACH3/KFLOP
> > > > > > > > > > > > >
> > > > > > > > > > > > > MACH3 set up with Step/Dir spindle
> > > > > > > > > > > > >
> > > > > > > > > > > > > Spindle motor runs, but there is no direction change. Testing the Kflop default spindle dir pin (hardware) shows it to be functional, but there is no dir change signal coming off the pin.
> > > > > > > > > > > > >
> > > > > > > > > > > > > Documentation and forum search do not have an answer that I can find.
> > > > > > > > > > > > >
> > > > > > > > > > > > > The plug-in config has a setting for 0=msg 1=dir 2=speed. Any setting other then 0 leaves spindle inoperative. What is the purpose of this setting? Is there any documentation?
> > > > > > > > > > > > >
> > > > > > > > > > > > > Thanks,
> > > > > > > > > > > > >
> > > > > > > > > > > > > -Steve
> > > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
|
|
Group: DynoMotion |
Message: 7509 |
From: tapiolarikka |
Date: 5/22/2013 |
Subject: Re: Mach3 servo spindle - no direction change |
Hi Steve!
Did you get your spindle working?
I noticed today that with lathe mode and CSS Mach3 expects the speed and feed to be on the same line in g-code so I had to remove the "*On" parameter from my below code.
Rgds,
Tapio
--- In DynoMotion@yahoogroups.com, "tapiolarikka" <tapio.larikka@...> wrote:
>
>
>
>
>
>
>
>
>
> Hi Tom/Steve,
>
> After yet an other day with the spindle I ended up with this:
>
> #include "KMotionDef.h"
>
> //Plugin Notifications and defines..
> enum { EX_DDA , EX_VMS, EX_COMMAND, EX_SPINON, EX_SPINOFF, EX_SPINSPEED, EX_MOTORTUNED
> , EX_SETUP, EX_FEEDHOLD, EX_RUN, EX_ESTOP , EX_CONFIG };
>
> #define SPINDLE_AXIS 3 // axis set up as Spindle, possibly Step/Dir or Servo
> #define FACTOR 226000.0 // Converts fractional pulley speed to counts/sec (may be negative)
>
> main()
> {
> int message = persist.UserData[0]; // Mach3 message ID
> int Direction = persist.UserData[1]; // Mach3 Spindle Direction
> float speed = *(float *)&persist.UserData[2]; // value stored is actually a float
> int *On = &persist.UserData[3]; // value stored is actually a float
> int DirFactor = 0;
>
> //if (Direction==0) DirFactor=-1; // change Direcion 0 or 1 to DirFactor -1 or +1
> if (Direction==0)
> {
> DirFactor=1;
> }
> else if (Direction==1)
> {
> DirFactor=-1;
> }
>
>
> switch (message)
> {
> case EX_SPINSPEED:
> DefineCoordSystem6(0,1,2,-1,-1,-1);
> speed = *(float *)&persist.UserData[2]; // value stored is actually a float
> printf("Mach3 Notify Message=%d, Direction=%2d, Spindle Set to %f, Run=%3d\n",message,Direction,speed,*On);
> Jog(SPINDLE_AXIS,speed*FACTOR*DirFactor*(*On));
> while (!CheckDone(SPINDLE_AXIS));
> break;
>
> case EX_SPINON:
> *On = TRUE;
> DefineCoordSystem6(0,1,2,-1,-1,-1);
> printf("Mach3 Notify Message=%d, Direction=%2d, Spindle Set to %f, Run=%3d\n",message,Direction,speed,*On);
> Jog(SPINDLE_AXIS,speed*FACTOR*DirFactor*(*On));
> while (!CheckDone(SPINDLE_AXIS));
> break;
>
> case EX_SPINOFF:
> *On = FALSE;
> printf("Mach3 Notify Message=%d, Direction=%2d, Spindle Set to %f, Run=%3d\n",message,Direction,speed,*On);
> Jog(SPINDLE_AXIS,0.0);
> while(!CheckDone(SPINDLE_AXIS));
> DefineCoordSystem6(0,1,2,3,-1,-1);
> break;
> }
>
> }
>
> With this my spindle works well enough:
> - spins to both directions
> - does not start with manual speed change
>
> Last remaining wrinkle flaw that I can't iron out is that manual speed change excludes A-axis from coordinate system. If I take the
> "DefineCoordSystem6(0,1,2,-1,-1,-1)" out of the "case EX_SPINSPEED:"
> the spindle/A-axis does not get excluded from coord system, resulting
> in A-axis following error.
>
> I also found that with above g-code
>
> S100
> M3
> F0.2
>
> works, but
>
> S100 F0.2
> M3
>
> does not work. Kflop tries to execute the code, but for some reason the spindle/A-axis does not get excluded from coord system, resulting
> in A-axis following error.
> What's even more odd is that it might work once or twice.
>
> M3
> S100 F0.2
>
> works, but the feedrate is not handled correctly. This also makes the
> spindle start at what ever speed happens to be in DRO.
>
>
> Rgds,
> Tapio
>
>
>
>
> --- In DynoMotion@yahoogroups.com, "tapiolarikka" <tapio.larikka@> wrote:
> >
> > Hi Tom!
> >
> > I didn't try your solution yet, I just found it, going through my e-mails. I'll try it first thing tomorrow morning.
> >
> > I meant that it looks like mach does not actively set the speed/spindle-on to zero at start up.
> >
> >
> > Rgds,
> > Tapio
> >
> > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > >
> > > Hi Tapio,
> > >
> > > I don't understand what you are saying. Did you try my solution? Does it work for you? Or would you like me to change your file for you?
> > >
> > > Regards
> > > TK
> > >
> > >
> > >
> > >
> > > ________________________________
> > > From: tapiolarikka <tapio.larikka@>
> > > To: DynoMotion@yahoogroups.com
> > > Sent: Tuesday, May 14, 2013 12:38 PM
> > > Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
> > >
> > >
> > >
> > > Â
> > > Hi Tom/Steve,
> > >
> > > I spent half a day tinkering with this same issue, spindle on with speed change after start up.
> > > Downside of my today's effort is messed up my working spindlemachjog.c. Only this time I was smart enough to make a copy before I started...
> > > As upside I count noticing that for some reason Mach remembers what ever was on the speed dro when shut down, and that first speed message comes with direction=0.
> > >
> > > Rgds,
> > > Tapio
> > >
> > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > >
> > > > Hi Steve,
> > > >
> > > > I've been able to duplicate this also.ÃÂ Not sure why Mach3 does this.ÃÂ I'm thinking your original approach with remembering if the Spindle is on or off is better.ÃÂ I've modified the program to do so using persist Variable #3 to remember the previous state.ÃÂ See attached.
> > > >
> > > > Regards
> > > > TK
> > > >
> > > >
> > > >
> > > > ________________________________
> > > > From: Steve <steve@>
> > > > To: DynoMotion@yahoogroups.com
> > > > Sent: Tuesday, May 14, 2013 6:56 AM
> > > > Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
> > > >
> > > >
> > > >
> > > > ÃÂ
> > > > The unexpected spindle ON with any speed change input is still present when MACH is first started. Once this initial toggle is passed, the solution works .
> > > >
> > > > I'm just posting this as a head's up as it is definately something to be aware of and is potentially dangerous.
> > > >
> > > > I will try putting an M5 in the reset and/or a 'Jog 0' command in the Kflop init and see if either of these will correctly set the system status on startup so that a speed change does not cause the unexpected spindle start.
> > > >
> > > > - Steve
> > > >
> > > > --- In DynoMotion@yahoogroups.com, "Steve" <steve@> wrote:
> > > > >
> > > > > Correction:
> > > > >
> > > > > Direction -1 is reported by MACH for spindle OFF condition. Sorry for typo. Program is correct.
> > > > >
> > > > > --- In DynoMotion@yahoogroups.com, "Steve" <steve@> wrote:
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > Tom explained that MACH reports a direction of -1 if the spindle is currently in the ON state, so using that param may be more reliable . . provided MACH does not change the way the param works.
> > > > > >
> > > > > > A variation of the program that uses this method is available here:
> > > > > >
> > > > > > http://www.thecubestudio.com/Kflop/SpindleMach3JogSimpsonRev1.htm
> > > > > >
> > > > > > There are only a couple of line to add to the standard sample program and they are shown in red.
> > > > > >
> > > > > > - Steve
> > > > > >
> > > > > >
> > > > > > --- In DynoMotion@yahoogroups.com, "Steve" <steve@> wrote:
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > I'm told that my use of the 'new' rich text editor (to highlight the progtram changes) may have caused the error. At the bottom of this post is a link to the program with the lines that I added or changed highlighted in red. I don't know much about Yahoo, but hopefully the link will work.
> > > > > > >
> > > > > > > The fundamental change is approach is to track the state of the spindle and only do a 'live' speed change iof the spindle is alrady running.
> > > > > > >
> > > > > > > Spindle ON commands (M3 M4) have separate instruction strings.
> > > > > > >
> > > > > > > There may be an elegant way to determine the spindle state, but absent a programmers reference, the down and dirty solutionwas to create a volatile variable and update it locally on each stae change. The variable ('SpindleIsRunning')is then used to condition the response to a speed change command.
> > > > > > >
> > > > > > > Use my example to add the lines to the SpindleMach3Jog.c sample file that comes with the Kflop. Make sure you enter channel/axis number and other params that are correct for your system.
> > > > > > >
> > > > > > > Rename it to something specific to your setup to keep the original example fiel intact and enter the new file name in the plug-in configuration.
> > > > > > >
> > > > > > > I have a custom speed 'slider' control on my screen along with buttons for cw, ccw and spindle stop. All are working properly with the modified program in the link above. G-code also works correctly.
> > > > > > >
> > > > > > > http://www.thecubestudio.com/Kflop/SpindleMach3JogSimpson.htm
> > > > > > >
> > > > > > > - Steve
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > > > >
> > > > > > > > Hi Steve,
> > > > > > > >
> > > > > > > > Please email it to me and I'll upload it.
> > > > > > > >
> > > > > > > > Thanks
> > > > > > > > TK
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > ________________________________
> > > > > > > > From: Steve <steve@>
> > > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > > Sent: Friday, May 3, 2013 12:27 AM
> > > > > > > > Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > ÃâÃÂ
> > > > > > > > Tom,
> > > > > > > >
> > > > > > > > I tried to post the program, but an error message was thrown up saying that the request could not be completed.
> > > > > > > >
> > > > > > > > =Steve
> > > > > > > >
> > > > > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > > > > >
> > > > > > > > > Hi Steve,
> > > > > > > > >
> > > > > > > > > Could you post your Spindle Program with the bug fixed.ÃÆ'ââ¬Å¡ÃâàIt would help solve a problem Tapio is having.
> > > > > > > > >
> > > > > > > > > Thanks
> > > > > > > > > TK
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > ________________________________
> > > > > > > > > From: Steve <steve@>
> > > > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > > > Sent: Tuesday, April 30, 2013 5:08 AM
> > > > > > > > > Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > I clarified the work-arounds (aka 'hacks') because you asked about them. They have no effect on the issue in any case, but to answer your question; for testing, everything is box-stock. No mods, work-arounds, custom screens or anything non-standard at all.
> > > > > > > > >
> > > > > > > > > Only the Kflop device is 'new' to me. I am not a novice and I understand establishing a base-line.
> > > > > > > > >
> > > > > > > > > I seem to have everything working now including my custom screen buttons that control the spindle. The solution for my application was to make changes to the spindle jog program.
> > > > > > > > >
> > > > > > > > > What I think is a significant problem in the sample program is the unconditional start of the spindle with a speed change input. If the speed command ('Sxxx')comes befor the Spindle ON command (M4, M3)the net result is an unexpected spindle start which is potentially very dangerous. Just my 2 cents worth. Take it as you like.
> > > > > > > > >
> > > > > > > > > I have solved this by making the Speed changing 'jog' conditional on the spindle being ON at the time of the speed change. If the spindle is OFF, a speed change updates the parameter but does not start the spindle.
> > > > > > > > >
> > > > > > > > > Thanks very much for the prompt replies and suggestions.
> > > > > > > > >
> > > > > > > > > - Steve
> > > > > > > > >
> > > > > > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > > > > > >
> > > > > > > > > > Hi Steve,
> > > > > > > > > >
> > > > > > > > > > You can of course do whatever you wish when you are not trying to troubleshoot problems, but it would be less confusing if the "hacks" were removed when testing.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàWere the hacks removed when you performed the tests?
> > > > > > > > > >
> > > > > > > > > > Strange.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàHaving M5 send no message is the exact behavior when Disable Spindle Relays is checked.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàYou might double check that.
> > > > > > > > > >
> > > > > > > > > > Please send the requested files.
> > > > > > > > > >
> > > > > > > > > > Regards
> > > > > > > > > > TK
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > ________________________________
> > > > > > > > > > From: Steve <steve@>
> > > > > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > > > > Sent: Monday, April 29, 2013 7:38 PM
> > > > > > > > > > Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > > > > My M3 and M4 'hacks' are work arounds so that the machine can do useful work. I switched over to a new computer with the Kflop on a machine that has to make parts for a living, so I can only do testing between runs. I will remove the 'hacks' and the patched in dir pin when we resolve the problem with the plug-in.
> > > > > > > > > >
> > > > > > > > > > FWIW, the new computer is all Intel (except the memory sticks). Intel processor, Intel Motherboard, and Intel SSD. Fresh install Win7 Pro 32 bit. There is nothing on this computer except Windows and MACH3. No antivirus, etc. nothing.
> > > > > > > > > >
> > > > > > > > > > TESTING RESULTS:
> > > > > > > > > >
> > > > > > > > > > Typed into MACH's screen 2 manual input line, M3 and M4 result in the following messages on the concole:
> > > > > > > > > >
> > > > > > > > > > Mach3 Notify Message 3, Direction = 1, Spindle set to xxxxxx
> > > > > > > > > > Spindle CCW ON
> > > > > > > > > > - and -
> > > > > > > > > > Mach3 Notify Message 3, Direction = 0, Spindle set to xxxxxx
> > > > > > > > > > Spindle CW ON
> > > > > > > > > >
> > > > > > > > > > Speed command 'Sxxxx' results in:
> > > > > > > > > > Mach3 Notify Message 5, Direction = x, Spindle set to xxxxxx
> > > > > > > > > > Spindle Speed Set To xxxxxxx
> > > > > > > > > >
> > > > > > > > > > In each of the above cases, there is an expected actual result; a direction change or speed change.
> > > > > > > > > >
> > > > > > > > > > Entry of M5 has no result. No message. ZIP. NADA. and of course no actual result.
> > > > > > > > > >
> > > > > > > > > > As I surmised, M5 is either not being sent by MACH, or the plug-in is not recognising it.
> > > > > > > > > >
> > > > > > > > > > = Steve
> > > > > > > > > >
> > > > > > > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > > > > > > >
> > > > > > > > > > > Hi Steve,
> > > > > > > > > > >
> > > > > > > > > > > Thanks.ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàHaving a working hardware output pin and having KFLOP Configured to use a Step/Dir Generator to use that pin in the TTL or Open collector modes are two different things is the reason we asked.ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàIt also wasn't clear if that was working reliably.ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàBut now it is clear.
> > > > > > > > > > >
> > > > > > > > > > > You of course should not need to change the M3 M4 macros to change the direction.ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàSo it would probably be best to remove that and find the real issue.
> > > > > > > > > > >
> > > > > > > > > > > Please check the Console in the manner I described and also post the requested files.
> > > > > > > > > > >
> > > > > > > > > > > Regards
> > > > > > > > > > > TK
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > ________________________________
> > > > > > > > > > > From: Steve <steve@>
> > > > > > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > > > > > Sent: Monday, April 29, 2013 3:42 PM
> > > > > > > > > > > Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > > > > > I mentioned in the OP that the pin functions normally, but if you need specifics, then yes the pin goes high and low when the box is checked in the digital I/O screen, the jog3 test that you asked for works fine, and as I also said, the direction is changing now, although not reliably. I have already done all of that.
> > > > > > > > > > >
> > > > > > > > > > > In fact I have a work around wherein I added an output to MACH and puta call in the M3 and M4 macros to toggle the output. I am using that output to change dir on the drive.
> > > > > > > > > > > This is a MACH spindle problem and the remaining issue is that the spindle does not turn ON and OFF, which I believe is a different problem from the dir change. I have not been able to figure out a work around for the ON/OFF problem.
> > > > > > > > > > >
> > > > > > > > > > > I can see that the C programs are printing, but there is never any message on the MACH screen, so I will assume it is printing to the console and take a peek to see if there are any clues and let you know.
> > > > > > > > > > >
> > > > > > > > > > > - Steve
> > > > > > > > > > >
> > > > > > > > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > > > > > > > >
> > > > > > > > > > > > Hi Steve,
> > > > > > > > > > > >
> > > > > > > > > > > > Please perform the tests described in the previous email.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàThe idea of testing from the KMotion Console is not to test if the Spindle Runs, but rather if the direction changes properly and reliably.
> > > > > > > > > > > >
> > > > > > > > > > > > If that works reliably use the KMotion Console to check if the Mach3 messages are getting to KFLOP properly.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàYou will need to report back to us: What you commanded in Mach3, what was printed in the Console, and what happened.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàIt would also be helpful to look at the Digital IO Screen to see if your Dir Bit is high or low in each step.
> > > > > > > > > > > >
> > > > > > > > > > > > If you still can't figure it out attach the Spindle Mach3 C Program, your Init C Program, and your Mach3 XML file (with the standard screen set selected) so we can check them.
> > > > > > > > > > > >
> > > > > > > > > > > > Regards
> > > > > > > > > > > > TK
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > > ________________________________
> > > > > > > > > > > > From: Steve <steve@>
> > > > > > > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > > > > > > Sent: Monday, April 29, 2013 1:16 PM
> > > > > > > > > > > > Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > > ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > > > > > > Tried checked and uncheched. No joy. Tried standard MACH screens; no joy.
> > > > > > > > > > > >
> > > > > > > > > > > > Tried the production version of the plugin; same behavior.
> > > > > > > > > > > >
> > > > > > > > > > > > ON/OFF commands are either not getting to the plugin, or are in the wrong format perhaps?
> > > > > > > > > > > >
> > > > > > > > > > > > If it matters, I am running 6 axis plus the spindle. The spindle axis (axis 6) is set up in the init file like all of the other axis.
> > > > > > > > > > > >
> > > > > > > > > > > > responds to speed changes and sporatically to M3 and M4 . . never responds to M5, which simply contains DoSpinStop()
> > > > > > > > > > > >
> > > > > > > > > > > > - Steve
> > > > > > > > > > > >
> > > > > > > > > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > > > > > > > > >
> > > > > > > > > > > > > Hi Steve,
> > > > > > > > > > > > >
> > > > > > > > > > > > > I think that the Mach3 option "Disable Spindle Relays" needs to be un-checked.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàOtherwise Mach3 doesn't send Spindle off to the Plugin for some reason.
> > > > > > > > > > > > >
> > > > > > > > > > > > > Regards
> > > > > > > > > > > > > TK
> > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > > ________________________________
> > > > > > > > > > > > > From: Steve <steve@>
> > > > > > > > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > > > > > > > Sent: Monday, April 29, 2013 11:21 AM
> > > > > > > > > > > > > Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
> > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > > ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > > > > > > > Note: The spindle DOES run, so the step signal is present, and I am checking for a dir signal on the Spindle DIR wire from the Kflop.
> > > > > > > > > > > > >
> > > > > > > > > > > > > I set up a step/dit spindle in the MACH config because the axis are configured within MACH.
> > > > > > > > > > > > >
> > > > > > > > > > > > > By removing the spindle from MACHs configuration, the M3 and M4 macros now change direction.
> > > > > > > > > > > > >
> > > > > > > > > > > > > However, M5 has no effect and the spindle starts as soon as a speed is entered and there is no way to shut it off except to enter a speed of zero.
> > > > > > > > > > > > >
> > > > > > > > > > > > > This is entering commands via MACHs MDI interface.
> > > > > > > > > > > > >
> > > > > > > > > > > > > It does not appear that ON/Off are being send or received. The spindle is locked ON at all times and responds only to speed (and now to direction via M3 and M4)
> > > > > > > > > > > > >
> > > > > > > > > > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Hi Steve,
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > First test the hardware and KFLOP configuration by Jogging the Spindle Axis both directions from the KMotion.exe Console Screen with something like Jog3=10000 and Jog3=-10000.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâà'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬ÃâæÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàDoes the
> > > axis move both ways?
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Our Plugin receives a Message (command action code), Direction, and Speed info from Mach3 which it writes into KFLOP before launching the spindle C program in KFLOP.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâà'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬ÃâæÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàThe Var parameter
> > > specifies which 3 consecutive UserData Variables in KFLOP the information will be
> > > > placed.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâà'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬ÃâæÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàSo for example Var is typically configured to be 0, so the 3 pieces of information are placed into Variables 0, 1, and
> > > 2.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâà'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬ÃâæÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàThe Plugin
> > > > > > > > Configuration and the way the C Program is written where to expect to find the data must match.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâà'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬ÃâæÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàOtherwise the C Program will use invalid data and things wont work at all.
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > I'm not sure what you mean by:ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâà'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬ÃâæÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡Ãâà"MACH3 set up with Step/Dir
> > > spindle"ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâà'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬ÃâæÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàSince KFLOP handles all motion Mach3 doesn't need to know what type of Spindle is connected and
> > > > how.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâà'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬ÃâæÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàIt just sends logical commands of speed, on, off, direction and the Plugin+KFLOP is expected to make it happen.
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > If your C Program contains diagnostic printout messages you can look at the KMotion Console Screen to see exactly if/what messages, speeds, directions, KFLOP is receiving.
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > If you still have problems post your Mach3 XML file and Spindle C program so we can check it.
> > > > > > > > > > > > > >
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > HTH
> > > > > > > > > > > > > > Regards
> > > > > > > > > > > > > > TK
> > > > > > > > > > > > > >
> > > > > > > > > > > > > >
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > ________________________________
> > > > > > > > > > > > > > From: Steve <steve@>
> > > > > > > > > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > > > > > > > > Sent: Monday, April 29, 2013 4:09 AM
> > > > > > > > > > > > > > Subject: [DynoMotion] Mach3 servo spindle - no direction change
> > > > > > > > > > > > > >
> > > > > > > > > > > > > >
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâà'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬ÃâæÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > > > > > > > > Using example SpindleMach3Jog.c with MACH3/KFLOP
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > MACH3 set up with Step/Dir spindle
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Spindle motor runs, but there is no direction change. Testing the Kflop default spindle dir pin (hardware) shows it to be functional, but there is no dir change signal coming off the pin.
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Documentation and forum search do not have an answer that I can find.
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > The plug-in config has a setting for 0=msg 1=dir 2=speed. Any setting other then 0 leaves spindle inoperative. What is the purpose of this setting? Is there any documentation?
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Thanks,
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > -Steve
> > > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
|
|
Group: DynoMotion |
Message: 7519 |
From: Steve |
Date: 5/24/2013 |
Subject: Re: Mach3 servo spindle - no direction change |
Tapio,
Your jog code seems complex. What is the purpose of repeatedly re-defining the the system axis? How is this related to spindle control?
- Steve
--- In DynoMotion@yahoogroups.com, "tapiolarikka" <tapio.larikka@...> wrote:
>
> Hi Steve!
>
> Did you get your spindle working?
>
> I noticed today that with lathe mode and CSS Mach3 expects the speed and feed to be on the same line in g-code so I had to remove the "*On" parameter from my below code.
>
> Rgds,
> Tapio
>
> --- In DynoMotion@yahoogroups.com, "tapiolarikka" <tapio.larikka@> wrote:
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > Hi Tom/Steve,
> >
> > After yet an other day with the spindle I ended up with this:
> >
> > #include "KMotionDef.h"
> >
> > //Plugin Notifications and defines..
> > enum { EX_DDA , EX_VMS, EX_COMMAND, EX_SPINON, EX_SPINOFF, EX_SPINSPEED, EX_MOTORTUNED
> > , EX_SETUP, EX_FEEDHOLD, EX_RUN, EX_ESTOP , EX_CONFIG };
> >
> > #define SPINDLE_AXIS 3 // axis set up as Spindle, possibly Step/Dir or Servo
> > #define FACTOR 226000.0 // Converts fractional pulley speed to counts/sec (may be negative)
> >
> > main()
> > {
> > int message = persist.UserData[0]; // Mach3 message ID
> > int Direction = persist.UserData[1]; // Mach3 Spindle Direction
> > float speed = *(float *)&persist.UserData[2]; // value stored is actually a float
> > int *On = &persist.UserData[3]; // value stored is actually a float
> > int DirFactor = 0;
> >
> > //if (Direction==0) DirFactor=-1; // change Direcion 0 or 1 to DirFactor -1 or +1
> > if (Direction==0)
> > {
> > DirFactor=1;
> > }
> > else if (Direction==1)
> > {
> > DirFactor=-1;
> > }
> >
> >
> > switch (message)
> > {
> > case EX_SPINSPEED:
> > DefineCoordSystem6(0,1,2,-1,-1,-1);
> > speed = *(float *)&persist.UserData[2]; // value stored is actually a float
> > printf("Mach3 Notify Message=%d, Direction=%2d, Spindle Set to %f, Run=%3d\n",message,Direction,speed,*On);
> > Jog(SPINDLE_AXIS,speed*FACTOR*DirFactor*(*On));
> > while (!CheckDone(SPINDLE_AXIS));
> > break;
> >
> > case EX_SPINON:
> > *On = TRUE;
> > DefineCoordSystem6(0,1,2,-1,-1,-1);
> > printf("Mach3 Notify Message=%d, Direction=%2d, Spindle Set to %f, Run=%3d\n",message,Direction,speed,*On);
> > Jog(SPINDLE_AXIS,speed*FACTOR*DirFactor*(*On));
> > while (!CheckDone(SPINDLE_AXIS));
> > break;
> >
> > case EX_SPINOFF:
> > *On = FALSE;
> > printf("Mach3 Notify Message=%d, Direction=%2d, Spindle Set to %f, Run=%3d\n",message,Direction,speed,*On);
> > Jog(SPINDLE_AXIS,0.0);
> > while(!CheckDone(SPINDLE_AXIS));
> > DefineCoordSystem6(0,1,2,3,-1,-1);
> > break;
> > }
> >
> > }
> >
> > With this my spindle works well enough:
> > - spins to both directions
> > - does not start with manual speed change
> >
> > Last remaining wrinkle flaw that I can't iron out is that manual speed change excludes A-axis from coordinate system. If I take the
> > "DefineCoordSystem6(0,1,2,-1,-1,-1)" out of the "case EX_SPINSPEED:"
> > the spindle/A-axis does not get excluded from coord system, resulting
> > in A-axis following error.
> >
> > I also found that with above g-code
> >
> > S100
> > M3
> > F0.2
> >
> > works, but
> >
> > S100 F0.2
> > M3
> >
> > does not work. Kflop tries to execute the code, but for some reason the spindle/A-axis does not get excluded from coord system, resulting
> > in A-axis following error.
> > What's even more odd is that it might work once or twice.
> >
> > M3
> > S100 F0.2
> >
> > works, but the feedrate is not handled correctly. This also makes the
> > spindle start at what ever speed happens to be in DRO.
> >
> >
> > Rgds,
> > Tapio
> >
> >
> >
> >
> > --- In DynoMotion@yahoogroups.com, "tapiolarikka" <tapio.larikka@> wrote:
> > >
> > > Hi Tom!
> > >
> > > I didn't try your solution yet, I just found it, going through my e-mails. I'll try it first thing tomorrow morning.
> > >
> > > I meant that it looks like mach does not actively set the speed/spindle-on to zero at start up.
> > >
> > >
> > > Rgds,
> > > Tapio
> > >
> > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > >
> > > > Hi Tapio,
> > > >
> > > > I don't understand what you are saying. Did you try my solution? Does it work for you? Or would you like me to change your file for you?
> > > >
> > > > Regards
> > > > TK
> > > >
> > > >
> > > >
> > > >
> > > > ________________________________
> > > > From: tapiolarikka <tapio.larikka@>
> > > > To: DynoMotion@yahoogroups.com
> > > > Sent: Tuesday, May 14, 2013 12:38 PM
> > > > Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
> > > >
> > > >
> > > >
> > > > Â
> > > > Hi Tom/Steve,
> > > >
> > > > I spent half a day tinkering with this same issue, spindle on with speed change after start up.
> > > > Downside of my today's effort is messed up my working spindlemachjog.c. Only this time I was smart enough to make a copy before I started...
> > > > As upside I count noticing that for some reason Mach remembers what ever was on the speed dro when shut down, and that first speed message comes with direction=0.
> > > >
> > > > Rgds,
> > > > Tapio
> > > >
> > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > >
> > > > > Hi Steve,
> > > > >
> > > > > I've been able to duplicate this also.ÃÂ Not sure why Mach3 does this.ÃÂ I'm thinking your original approach with remembering if the Spindle is on or off is better.ÃÂ I've modified the program to do so using persist Variable #3 to remember the previous state.ÃÂ See attached.
> > > > >
> > > > > Regards
> > > > > TK
> > > > >
> > > > >
> > > > >
> > > > > ________________________________
> > > > > From: Steve <steve@>
> > > > > To: DynoMotion@yahoogroups.com
> > > > > Sent: Tuesday, May 14, 2013 6:56 AM
> > > > > Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
> > > > >
> > > > >
> > > > >
> > > > > ÃÂ
> > > > > The unexpected spindle ON with any speed change input is still present when MACH is first started. Once this initial toggle is passed, the solution works .
> > > > >
> > > > > I'm just posting this as a head's up as it is definately something to be aware of and is potentially dangerous.
> > > > >
> > > > > I will try putting an M5 in the reset and/or a 'Jog 0' command in the Kflop init and see if either of these will correctly set the system status on startup so that a speed change does not cause the unexpected spindle start.
> > > > >
> > > > > - Steve
> > > > >
> > > > > --- In DynoMotion@yahoogroups.com, "Steve" <steve@> wrote:
> > > > > >
> > > > > > Correction:
> > > > > >
> > > > > > Direction -1 is reported by MACH for spindle OFF condition. Sorry for typo. Program is correct.
> > > > > >
> > > > > > --- In DynoMotion@yahoogroups.com, "Steve" <steve@> wrote:
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > Tom explained that MACH reports a direction of -1 if the spindle is currently in the ON state, so using that param may be more reliable . . provided MACH does not change the way the param works.
> > > > > > >
> > > > > > > A variation of the program that uses this method is available here:
> > > > > > >
> > > > > > > http://www.thecubestudio.com/Kflop/SpindleMach3JogSimpsonRev1.htm
> > > > > > >
> > > > > > > There are only a couple of line to add to the standard sample program and they are shown in red.
> > > > > > >
> > > > > > > - Steve
> > > > > > >
> > > > > > >
> > > > > > > --- In DynoMotion@yahoogroups.com, "Steve" <steve@> wrote:
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > I'm told that my use of the 'new' rich text editor (to highlight the progtram changes) may have caused the error. At the bottom of this post is a link to the program with the lines that I added or changed highlighted in red. I don't know much about Yahoo, but hopefully the link will work.
> > > > > > > >
> > > > > > > > The fundamental change is approach is to track the state of the spindle and only do a 'live' speed change iof the spindle is alrady running.
> > > > > > > >
> > > > > > > > Spindle ON commands (M3 M4) have separate instruction strings.
> > > > > > > >
> > > > > > > > There may be an elegant way to determine the spindle state, but absent a programmers reference, the down and dirty solutionwas to create a volatile variable and update it locally on each stae change. The variable ('SpindleIsRunning')is then used to condition the response to a speed change command.
> > > > > > > >
> > > > > > > > Use my example to add the lines to the SpindleMach3Jog.c sample file that comes with the Kflop. Make sure you enter channel/axis number and other params that are correct for your system.
> > > > > > > >
> > > > > > > > Rename it to something specific to your setup to keep the original example fiel intact and enter the new file name in the plug-in configuration.
> > > > > > > >
> > > > > > > > I have a custom speed 'slider' control on my screen along with buttons for cw, ccw and spindle stop. All are working properly with the modified program in the link above. G-code also works correctly.
> > > > > > > >
> > > > > > > > http://www.thecubestudio.com/Kflop/SpindleMach3JogSimpson.htm
> > > > > > > >
> > > > > > > > - Steve
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > > > > >
> > > > > > > > > Hi Steve,
> > > > > > > > >
> > > > > > > > > Please email it to me and I'll upload it.
> > > > > > > > >
> > > > > > > > > Thanks
> > > > > > > > > TK
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > ________________________________
> > > > > > > > > From: Steve <steve@>
> > > > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > > > Sent: Friday, May 3, 2013 12:27 AM
> > > > > > > > > Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > ÃâÃÂ
> > > > > > > > > Tom,
> > > > > > > > >
> > > > > > > > > I tried to post the program, but an error message was thrown up saying that the request could not be completed.
> > > > > > > > >
> > > > > > > > > =Steve
> > > > > > > > >
> > > > > > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > > > > > >
> > > > > > > > > > Hi Steve,
> > > > > > > > > >
> > > > > > > > > > Could you post your Spindle Program with the bug fixed.ÃÆ'ââ¬Å¡ÃâàIt would help solve a problem Tapio is having.
> > > > > > > > > >
> > > > > > > > > > Thanks
> > > > > > > > > > TK
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > ________________________________
> > > > > > > > > > From: Steve <steve@>
> > > > > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > > > > Sent: Tuesday, April 30, 2013 5:08 AM
> > > > > > > > > > Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > I clarified the work-arounds (aka 'hacks') because you asked about them. They have no effect on the issue in any case, but to answer your question; for testing, everything is box-stock. No mods, work-arounds, custom screens or anything non-standard at all.
> > > > > > > > > >
> > > > > > > > > > Only the Kflop device is 'new' to me. I am not a novice and I understand establishing a base-line.
> > > > > > > > > >
> > > > > > > > > > I seem to have everything working now including my custom screen buttons that control the spindle. The solution for my application was to make changes to the spindle jog program.
> > > > > > > > > >
> > > > > > > > > > What I think is a significant problem in the sample program is the unconditional start of the spindle with a speed change input. If the speed command ('Sxxx')comes befor the Spindle ON command (M4, M3)the net result is an unexpected spindle start which is potentially very dangerous. Just my 2 cents worth. Take it as you like.
> > > > > > > > > >
> > > > > > > > > > I have solved this by making the Speed changing 'jog' conditional on the spindle being ON at the time of the speed change. If the spindle is OFF, a speed change updates the parameter but does not start the spindle.
> > > > > > > > > >
> > > > > > > > > > Thanks very much for the prompt replies and suggestions.
> > > > > > > > > >
> > > > > > > > > > - Steve
> > > > > > > > > >
> > > > > > > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > > > > > > >
> > > > > > > > > > > Hi Steve,
> > > > > > > > > > >
> > > > > > > > > > > You can of course do whatever you wish when you are not trying to troubleshoot problems, but it would be less confusing if the "hacks" were removed when testing.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàWere the hacks removed when you performed the tests?
> > > > > > > > > > >
> > > > > > > > > > > Strange.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàHaving M5 send no message is the exact behavior when Disable Spindle Relays is checked.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàYou might double check that.
> > > > > > > > > > >
> > > > > > > > > > > Please send the requested files.
> > > > > > > > > > >
> > > > > > > > > > > Regards
> > > > > > > > > > > TK
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > ________________________________
> > > > > > > > > > > From: Steve <steve@>
> > > > > > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > > > > > Sent: Monday, April 29, 2013 7:38 PM
> > > > > > > > > > > Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > > > > > My M3 and M4 'hacks' are work arounds so that the machine can do useful work. I switched over to a new computer with the Kflop on a machine that has to make parts for a living, so I can only do testing between runs. I will remove the 'hacks' and the patched in dir pin when we resolve the problem with the plug-in.
> > > > > > > > > > >
> > > > > > > > > > > FWIW, the new computer is all Intel (except the memory sticks). Intel processor, Intel Motherboard, and Intel SSD. Fresh install Win7 Pro 32 bit. There is nothing on this computer except Windows and MACH3. No antivirus, etc. nothing.
> > > > > > > > > > >
> > > > > > > > > > > TESTING RESULTS:
> > > > > > > > > > >
> > > > > > > > > > > Typed into MACH's screen 2 manual input line, M3 and M4 result in the following messages on the concole:
> > > > > > > > > > >
> > > > > > > > > > > Mach3 Notify Message 3, Direction = 1, Spindle set to xxxxxx
> > > > > > > > > > > Spindle CCW ON
> > > > > > > > > > > - and -
> > > > > > > > > > > Mach3 Notify Message 3, Direction = 0, Spindle set to xxxxxx
> > > > > > > > > > > Spindle CW ON
> > > > > > > > > > >
> > > > > > > > > > > Speed command 'Sxxxx' results in:
> > > > > > > > > > > Mach3 Notify Message 5, Direction = x, Spindle set to xxxxxx
> > > > > > > > > > > Spindle Speed Set To xxxxxxx
> > > > > > > > > > >
> > > > > > > > > > > In each of the above cases, there is an expected actual result; a direction change or speed change.
> > > > > > > > > > >
> > > > > > > > > > > Entry of M5 has no result. No message. ZIP. NADA. and of course no actual result.
> > > > > > > > > > >
> > > > > > > > > > > As I surmised, M5 is either not being sent by MACH, or the plug-in is not recognising it.
> > > > > > > > > > >
> > > > > > > > > > > = Steve
> > > > > > > > > > >
> > > > > > > > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > > > > > > > >
> > > > > > > > > > > > Hi Steve,
> > > > > > > > > > > >
> > > > > > > > > > > > Thanks.ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàHaving a working hardware output pin and having KFLOP Configured to use a Step/Dir Generator to use that pin in the TTL or Open collector modes are two different things is the reason we asked.ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàIt also wasn't clear if that was working reliably.ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàBut now it is clear.
> > > > > > > > > > > >
> > > > > > > > > > > > You of course should not need to change the M3 M4 macros to change the direction.ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàSo it would probably be best to remove that and find the real issue.
> > > > > > > > > > > >
> > > > > > > > > > > > Please check the Console in the manner I described and also post the requested files.
> > > > > > > > > > > >
> > > > > > > > > > > > Regards
> > > > > > > > > > > > TK
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > > ________________________________
> > > > > > > > > > > > From: Steve <steve@>
> > > > > > > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > > > > > > Sent: Monday, April 29, 2013 3:42 PM
> > > > > > > > > > > > Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > > ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > > > > > > I mentioned in the OP that the pin functions normally, but if you need specifics, then yes the pin goes high and low when the box is checked in the digital I/O screen, the jog3 test that you asked for works fine, and as I also said, the direction is changing now, although not reliably. I have already done all of that.
> > > > > > > > > > > >
> > > > > > > > > > > > In fact I have a work around wherein I added an output to MACH and puta call in the M3 and M4 macros to toggle the output. I am using that output to change dir on the drive.
> > > > > > > > > > > > This is a MACH spindle problem and the remaining issue is that the spindle does not turn ON and OFF, which I believe is a different problem from the dir change. I have not been able to figure out a work around for the ON/OFF problem.
> > > > > > > > > > > >
> > > > > > > > > > > > I can see that the C programs are printing, but there is never any message on the MACH screen, so I will assume it is printing to the console and take a peek to see if there are any clues and let you know.
> > > > > > > > > > > >
> > > > > > > > > > > > - Steve
> > > > > > > > > > > >
> > > > > > > > > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > > > > > > > > >
> > > > > > > > > > > > > Hi Steve,
> > > > > > > > > > > > >
> > > > > > > > > > > > > Please perform the tests described in the previous email.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàThe idea of testing from the KMotion Console is not to test if the Spindle Runs, but rather if the direction changes properly and reliably.
> > > > > > > > > > > > >
> > > > > > > > > > > > > If that works reliably use the KMotion Console to check if the Mach3 messages are getting to KFLOP properly.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàYou will need to report back to us: What you commanded in Mach3, what was printed in the Console, and what happened.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàIt would also be helpful to look at the Digital IO Screen to see if your Dir Bit is high or low in each step.
> > > > > > > > > > > > >
> > > > > > > > > > > > > If you still can't figure it out attach the Spindle Mach3 C Program, your Init C Program, and your Mach3 XML file (with the standard screen set selected) so we can check them.
> > > > > > > > > > > > >
> > > > > > > > > > > > > Regards
> > > > > > > > > > > > > TK
> > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > > ________________________________
> > > > > > > > > > > > > From: Steve <steve@>
> > > > > > > > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > > > > > > > Sent: Monday, April 29, 2013 1:16 PM
> > > > > > > > > > > > > Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
> > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > > ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > > > > > > > Tried checked and uncheched. No joy. Tried standard MACH screens; no joy.
> > > > > > > > > > > > >
> > > > > > > > > > > > > Tried the production version of the plugin; same behavior.
> > > > > > > > > > > > >
> > > > > > > > > > > > > ON/OFF commands are either not getting to the plugin, or are in the wrong format perhaps?
> > > > > > > > > > > > >
> > > > > > > > > > > > > If it matters, I am running 6 axis plus the spindle. The spindle axis (axis 6) is set up in the init file like all of the other axis.
> > > > > > > > > > > > >
> > > > > > > > > > > > > responds to speed changes and sporatically to M3 and M4 . . never responds to M5, which simply contains DoSpinStop()
> > > > > > > > > > > > >
> > > > > > > > > > > > > - Steve
> > > > > > > > > > > > >
> > > > > > > > > > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Hi Steve,
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > I think that the Mach3 option "Disable Spindle Relays" needs to be un-checked.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàOtherwise Mach3 doesn't send Spindle off to the Plugin for some reason.
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Regards
> > > > > > > > > > > > > > TK
> > > > > > > > > > > > > >
> > > > > > > > > > > > > >
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > ________________________________
> > > > > > > > > > > > > > From: Steve <steve@>
> > > > > > > > > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > > > > > > > > Sent: Monday, April 29, 2013 11:21 AM
> > > > > > > > > > > > > > Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
> > > > > > > > > > > > > >
> > > > > > > > > > > > > >
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > > > > > > > > Note: The spindle DOES run, so the step signal is present, and I am checking for a dir signal on the Spindle DIR wire from the Kflop.
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > I set up a step/dit spindle in the MACH config because the axis are configured within MACH.
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > By removing the spindle from MACHs configuration, the M3 and M4 macros now change direction.
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > However, M5 has no effect and the spindle starts as soon as a speed is entered and there is no way to shut it off except to enter a speed of zero.
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > This is entering commands via MACHs MDI interface.
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > It does not appear that ON/Off are being send or received. The spindle is locked ON at all times and responds only to speed (and now to direction via M3 and M4)
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > Hi Steve,
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > First test the hardware and KFLOP configuration by Jogging the Spindle Axis both directions from the KMotion.exe Console Screen with something like Jog3=10000 and Jog3=-10000.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâà'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬ÃâæÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàDoes the
> > > > axis move both ways?
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > Our Plugin receives a Message (command action code), Direction, and Speed info from Mach3 which it writes into KFLOP before launching the spindle C program in KFLOP.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâà'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬ÃâæÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàThe Var parameter
> > > > specifies which 3 consecutive UserData Variables in KFLOP the information will be
> > > > > placed.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâà'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬ÃâæÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàSo for example Var is typically configured to be 0, so the 3 pieces of information are placed into Variables 0, 1, and
> > > > 2.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâà'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬ÃâæÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàThe Plugin
> > > > > > > > > Configuration and the way the C Program is written where to expect to find the data must match.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâà'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬ÃâæÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàOtherwise the C Program will use invalid data and things wont work at all.
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > I'm not sure what you mean by:ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâà'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬ÃâæÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡Ãâà"MACH3 set up with Step/Dir
> > > > spindle"ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâà'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬ÃâæÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàSince KFLOP handles all motion Mach3 doesn't need to know what type of Spindle is connected and
> > > > > how.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâà'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬ÃâæÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàIt just sends logical commands of speed, on, off, direction and the Plugin+KFLOP is expected to make it happen.
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > If your C Program contains diagnostic printout messages you can look at the KMotion Console Screen to see exactly if/what messages, speeds, directions, KFLOP is receiving.
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > If you still have problems post your Mach3 XML file and Spindle C program so we can check it.
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > HTH
> > > > > > > > > > > > > > > Regards
> > > > > > > > > > > > > > > TK
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > ________________________________
> > > > > > > > > > > > > > > From: Steve <steve@>
> > > > > > > > > > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > > > > > > > > > Sent: Monday, April 29, 2013 4:09 AM
> > > > > > > > > > > > > > > Subject: [DynoMotion] Mach3 servo spindle - no direction change
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâà'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬ÃâæÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > > > > > > > > > Using example SpindleMach3Jog.c with MACH3/KFLOP
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > MACH3 set up with Step/Dir spindle
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > Spindle motor runs, but there is no direction change. Testing the Kflop default spindle dir pin (hardware) shows it to be functional, but there is no dir change signal coming off the pin.
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > Documentation and forum search do not have an answer that I can find.
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > The plug-in config has a setting for 0=msg 1=dir 2=speed. Any setting other then 0 leaves spindle inoperative. What is the purpose of this setting? Is there any documentation?
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > Thanks,
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > -Steve
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
|
|
Group: DynoMotion |
Message: 7520 |
From: Steve |
Date: 5/24/2013 |
Subject: Re: Mach3 servo spindle - no direction change |
Tom,
Sorry for late reply. I don't know much about Yahoo. I get a ton of email notices from groups that I do not participate in and none from this group . . . odd . . . . so unless I come and peek in I don't know there is acticity on my topics. And I can't find the attachment to your post that you mentioned.
However, I did read thru the posts and I understand that you are using an 'user.persist' variable in place of a volatile. So then I assume that user.persist variables are not read only. Interesting.
Is there then, two way communication with MACH thru these variables?
I believe some fragments of our 'hybrid' solution is contained in some code that Tapio posted so I'll see if I can devine your approach from that.
Incidentally on this topic I did try a variety of methods to try to get MACH to start with the variable set correctly, but to no avail.
- Steve
--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Steve,
>
> I've been able to duplicate this also. Not sure why Mach3 does this. I'm thinking your original approach with remembering if the Spindle is on or off is better. I've modified the program to do so using persist Variable #3 to remember the previous state. See attached.
>
> Regards
> TK
>
>
>
> ________________________________
> From: Steve <steve@...>
> To: DynoMotion@yahoogroups.com
> Sent: Tuesday, May 14, 2013 6:56 AM
> Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
>
>
>
> Â
> The unexpected spindle ON with any speed change input is still present when MACH is first started. Once this initial toggle is passed, the solution works .
>
> I'm just posting this as a head's up as it is definately something to be aware of and is potentially dangerous.
>
> I will try putting an M5 in the reset and/or a 'Jog 0' command in the Kflop init and see if either of these will correctly set the system status on startup so that a speed change does not cause the unexpected spindle start.
>
> - Steve
>
> --- In DynoMotion@yahoogroups.com, "Steve" <steve@> wrote:
> >
> > Correction:
> >
> > Direction -1 is reported by MACH for spindle OFF condition. Sorry for typo. Program is correct.
> >
> > --- In DynoMotion@yahoogroups.com, "Steve" <steve@> wrote:
> > >
> > >
> > >
> > >
> > > Tom explained that MACH reports a direction of -1 if the spindle is currently in the ON state, so using that param may be more reliable . . provided MACH does not change the way the param works.
> > >
> > > A variation of the program that uses this method is available here:
> > >
> > > http://www.thecubestudio.com/Kflop/SpindleMach3JogSimpsonRev1.htm
> > >
> > > There are only a couple of line to add to the standard sample program and they are shown in red.
> > >
> > > - Steve
> > >
> > >
> > > --- In DynoMotion@yahoogroups.com, "Steve" <steve@> wrote:
> > > >
> > > >
> > > >
> > > > I'm told that my use of the 'new' rich text editor (to highlight the progtram changes) may have caused the error. At the bottom of this post is a link to the program with the lines that I added or changed highlighted in red. I don't know much about Yahoo, but hopefully the link will work.
> > > >
> > > > The fundamental change is approach is to track the state of the spindle and only do a 'live' speed change iof the spindle is alrady running.
> > > >
> > > > Spindle ON commands (M3 M4) have separate instruction strings.
> > > >
> > > > There may be an elegant way to determine the spindle state, but absent a programmers reference, the down and dirty solutionwas to create a volatile variable and update it locally on each stae change. The variable ('SpindleIsRunning')is then used to condition the response to a speed change command.
> > > >
> > > > Use my example to add the lines to the SpindleMach3Jog.c sample file that comes with the Kflop. Make sure you enter channel/axis number and other params that are correct for your system.
> > > >
> > > > Rename it to something specific to your setup to keep the original example fiel intact and enter the new file name in the plug-in configuration.
> > > >
> > > > I have a custom speed 'slider' control on my screen along with buttons for cw, ccw and spindle stop. All are working properly with the modified program in the link above. G-code also works correctly.
> > > >
> > > > http://www.thecubestudio.com/Kflop/SpindleMach3JogSimpson.htm
> > > >
> > > > - Steve
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > >
> > > > > Hi Steve,
> > > > >
> > > > > Please email it to me and I'll upload it.
> > > > >
> > > > > Thanks
> > > > > TK
> > > > >
> > > > >
> > > > >
> > > > > ________________________________
> > > > > From: Steve <steve@>
> > > > > To: DynoMotion@yahoogroups.com
> > > > > Sent: Friday, May 3, 2013 12:27 AM
> > > > > Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
> > > > >
> > > > >
> > > > >
> > > > > ÃÂ
> > > > > Tom,
> > > > >
> > > > > I tried to post the program, but an error message was thrown up saying that the request could not be completed.
> > > > >
> > > > > =Steve
> > > > >
> > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > >
> > > > > > Hi Steve,
> > > > > >
> > > > > > Could you post your Spindle Program with the bug fixed.ÃâàIt would help solve a problem Tapio is having.
> > > > > >
> > > > > > Thanks
> > > > > > TK
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > ________________________________
> > > > > > From: Steve <steve@>
> > > > > > To: DynoMotion@yahoogroups.com
> > > > > > Sent: Tuesday, April 30, 2013 5:08 AM
> > > > > > Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
> > > > > >
> > > > > >
> > > > > >
> > > > > > ÃâÃÂ
> > > > > >
> > > > > >
> > > > > > I clarified the work-arounds (aka 'hacks') because you asked about them. They have no effect on the issue in any case, but to answer your question; for testing, everything is box-stock. No mods, work-arounds, custom screens or anything non-standard at all.
> > > > > >
> > > > > > Only the Kflop device is 'new' to me. I am not a novice and I understand establishing a base-line.
> > > > > >
> > > > > > I seem to have everything working now including my custom screen buttons that control the spindle. The solution for my application was to make changes to the spindle jog program.
> > > > > >
> > > > > > What I think is a significant problem in the sample program is the unconditional start of the spindle with a speed change input. If the speed command ('Sxxx')comes befor the Spindle ON command (M4, M3)the net result is an unexpected spindle start which is potentially very dangerous. Just my 2 cents worth. Take it as you like.
> > > > > >
> > > > > > I have solved this by making the Speed changing 'jog' conditional on the spindle being ON at the time of the speed change. If the spindle is OFF, a speed change updates the parameter but does not start the spindle.
> > > > > >
> > > > > > Thanks very much for the prompt replies and suggestions.
> > > > > >
> > > > > > - Steve
> > > > > >
> > > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > > >
> > > > > > > Hi Steve,
> > > > > > >
> > > > > > > You can of course do whatever you wish when you are not trying to troubleshoot problems, but it would be less confusing if the "hacks" were removed when testing.ÃÆ'ââ¬Å¡ÃâàWere the hacks removed when you performed the tests?
> > > > > > >
> > > > > > > Strange.ÃÆ'ââ¬Å¡ÃâàHaving M5 send no message is the exact behavior when Disable Spindle Relays is checked.ÃÆ'ââ¬Å¡ÃâàYou might double check that.
> > > > > > >
> > > > > > > Please send the requested files.
> > > > > > >
> > > > > > > Regards
> > > > > > > TK
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > ________________________________
> > > > > > > From: Steve <steve@>
> > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > Sent: Monday, April 29, 2013 7:38 PM
> > > > > > > Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > My M3 and M4 'hacks' are work arounds so that the machine can do useful work. I switched over to a new computer with the Kflop on a machine that has to make parts for a living, so I can only do testing between runs. I will remove the 'hacks' and the patched in dir pin when we resolve the problem with the plug-in.
> > > > > > >
> > > > > > > FWIW, the new computer is all Intel (except the memory sticks). Intel processor, Intel Motherboard, and Intel SSD. Fresh install Win7 Pro 32 bit. There is nothing on this computer except Windows and MACH3. No antivirus, etc. nothing.
> > > > > > >
> > > > > > > TESTING RESULTS:
> > > > > > >
> > > > > > > Typed into MACH's screen 2 manual input line, M3 and M4 result in the following messages on the concole:
> > > > > > >
> > > > > > > Mach3 Notify Message 3, Direction = 1, Spindle set to xxxxxx
> > > > > > > Spindle CCW ON
> > > > > > > - and -
> > > > > > > Mach3 Notify Message 3, Direction = 0, Spindle set to xxxxxx
> > > > > > > Spindle CW ON
> > > > > > >
> > > > > > > Speed command 'Sxxxx' results in:
> > > > > > > Mach3 Notify Message 5, Direction = x, Spindle set to xxxxxx
> > > > > > > Spindle Speed Set To xxxxxxx
> > > > > > >
> > > > > > > In each of the above cases, there is an expected actual result; a direction change or speed change.
> > > > > > >
> > > > > > > Entry of M5 has no result. No message. ZIP. NADA. and of course no actual result.
> > > > > > >
> > > > > > > As I surmised, M5 is either not being sent by MACH, or the plug-in is not recognising it.
> > > > > > >
> > > > > > > = Steve
> > > > > > >
> > > > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > > > >
> > > > > > > > Hi Steve,
> > > > > > > >
> > > > > > > > Thanks.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàHaving a working hardware output pin and having KFLOP Configured to use a Step/Dir Generator to use that pin in the TTL or Open collector modes are two different things is the reason we asked.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàIt also wasn't clear if that was working reliably.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàBut now it is clear.
> > > > > > > >
> > > > > > > > You of course should not need to change the M3 M4 macros to change the direction.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàSo it would probably be best to remove that and find the real issue.
> > > > > > > >
> > > > > > > > Please check the Console in the manner I described and also post the requested files.
> > > > > > > >
> > > > > > > > Regards
> > > > > > > > TK
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > ________________________________
> > > > > > > > From: Steve <steve@>
> > > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > > Sent: Monday, April 29, 2013 3:42 PM
> > > > > > > > Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > > I mentioned in the OP that the pin functions normally, but if you need specifics, then yes the pin goes high and low when the box is checked in the digital I/O screen, the jog3 test that you asked for works fine, and as I also said, the direction is changing now, although not reliably. I have already done all of that.
> > > > > > > >
> > > > > > > > In fact I have a work around wherein I added an output to MACH and puta call in the M3 and M4 macros to toggle the output. I am using that output to change dir on the drive.
> > > > > > > > This is a MACH spindle problem and the remaining issue is that the spindle does not turn ON and OFF, which I believe is a different problem from the dir change. I have not been able to figure out a work around for the ON/OFF problem.
> > > > > > > >
> > > > > > > > I can see that the C programs are printing, but there is never any message on the MACH screen, so I will assume it is printing to the console and take a peek to see if there are any clues and let you know.
> > > > > > > >
> > > > > > > > - Steve
> > > > > > > >
> > > > > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > > > > >
> > > > > > > > > Hi Steve,
> > > > > > > > >
> > > > > > > > > Please perform the tests described in the previous email.ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàThe idea of testing from the KMotion Console is not to test if the Spindle Runs, but rather if the direction changes properly and reliably.
> > > > > > > > >
> > > > > > > > > If that works reliably use the KMotion Console to check if the Mach3 messages are getting to KFLOP properly.ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàYou will need to report back to us: What you commanded in Mach3, what was printed in the Console, and what happened.ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàIt would also be helpful to look at the Digital IO Screen to see if your Dir Bit is high or low in each step.
> > > > > > > > >
> > > > > > > > > If you still can't figure it out attach the Spindle Mach3 C Program, your Init C Program, and your Mach3 XML file (with the standard screen set selected) so we can check them.
> > > > > > > > >
> > > > > > > > > Regards
> > > > > > > > > TK
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > ________________________________
> > > > > > > > > From: Steve <steve@>
> > > > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > > > Sent: Monday, April 29, 2013 1:16 PM
> > > > > > > > > Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > > > Tried checked and uncheched. No joy. Tried standard MACH screens; no joy.
> > > > > > > > >
> > > > > > > > > Tried the production version of the plugin; same behavior.
> > > > > > > > >
> > > > > > > > > ON/OFF commands are either not getting to the plugin, or are in the wrong format perhaps?
> > > > > > > > >
> > > > > > > > > If it matters, I am running 6 axis plus the spindle. The spindle axis (axis 6) is set up in the init file like all of the other axis.
> > > > > > > > >
> > > > > > > > > responds to speed changes and sporatically to M3 and M4 . . never responds to M5, which simply contains DoSpinStop()
> > > > > > > > >
> > > > > > > > > - Steve
> > > > > > > > >
> > > > > > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > > > > > >
> > > > > > > > > > Hi Steve,
> > > > > > > > > >
> > > > > > > > > > I think that the Mach3 option "Disable Spindle Relays" needs to be un-checked.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàOtherwise Mach3 doesn't send Spindle off to the Plugin for some reason.
> > > > > > > > > >
> > > > > > > > > > Regards
> > > > > > > > > > TK
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > ________________________________
> > > > > > > > > > From: Steve <steve@>
> > > > > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > > > > Sent: Monday, April 29, 2013 11:21 AM
> > > > > > > > > > Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > > > > Note: The spindle DOES run, so the step signal is present, and I am checking for a dir signal on the Spindle DIR wire from the Kflop.
> > > > > > > > > >
> > > > > > > > > > I set up a step/dit spindle in the MACH config because the axis are configured within MACH.
> > > > > > > > > >
> > > > > > > > > > By removing the spindle from MACHs configuration, the M3 and M4 macros now change direction.
> > > > > > > > > >
> > > > > > > > > > However, M5 has no effect and the spindle starts as soon as a speed is entered and there is no way to shut it off except to enter a speed of zero.
> > > > > > > > > >
> > > > > > > > > > This is entering commands via MACHs MDI interface.
> > > > > > > > > >
> > > > > > > > > > It does not appear that ON/Off are being send or received. The spindle is locked ON at all times and responds only to speed (and now to direction via M3 and M4)
> > > > > > > > > >
> > > > > > > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > > > > > > >
> > > > > > > > > > > Hi Steve,
> > > > > > > > > > >
> > > > > > > > > > > First test the hardware and KFLOP configuration by Jogging the Spindle Axis both directions from the KMotion.exe Console Screen with something like Jog3=10000 and Jog3=-10000.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàDoes the axis move both ways?
> > > > > > > > > > >
> > > > > > > > > > > Our Plugin receives a Message (command action code), Direction, and Speed info from Mach3 which it writes into KFLOP before launching the spindle C program in KFLOP.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàThe Var parameter specifies which 3 consecutive UserData Variables in KFLOP the information will be
> placed.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàSo for example Var is typically configured to be 0, so the 3 pieces of information are placed into Variables 0, 1, and 2.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàThe Plugin
> > > > > Configuration and the way the C Program is written where to expect to find the data must match.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàOtherwise the C Program will use invalid data and things wont work at all.
> > > > > > > > > > >
> > > > > > > > > > > I'm not sure what you mean by:ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡Ãâà"MACH3 set up with Step/Dir spindle"ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàSince KFLOP handles all motion Mach3 doesn't need to know what type of Spindle is connected and
> how.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàIt just sends logical commands of speed, on, off, direction and the Plugin+KFLOP is expected to make it happen.
> > > > > > > > > > >
> > > > > > > > > > > If your C Program contains diagnostic printout messages you can look at the KMotion Console Screen to see exactly if/what messages, speeds, directions, KFLOP is receiving.
> > > > > > > > > > >
> > > > > > > > > > > If you still have problems post your Mach3 XML file and Spindle C program so we can check it.
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > HTH
> > > > > > > > > > > Regards
> > > > > > > > > > > TK
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > ________________________________
> > > > > > > > > > > From: Steve <steve@>
> > > > > > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > > > > > Sent: Monday, April 29, 2013 4:09 AM
> > > > > > > > > > > Subject: [DynoMotion] Mach3 servo spindle - no direction change
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > > > > > Using example SpindleMach3Jog.c with MACH3/KFLOP
> > > > > > > > > > >
> > > > > > > > > > > MACH3 set up with Step/Dir spindle
> > > > > > > > > > >
> > > > > > > > > > > Spindle motor runs, but there is no direction change. Testing the Kflop default spindle dir pin (hardware) shows it to be functional, but there is no dir change signal coming off the pin.
> > > > > > > > > > >
> > > > > > > > > > > Documentation and forum search do not have an answer that I can find.
> > > > > > > > > > >
> > > > > > > > > > > The plug-in config has a setting for 0=msg 1=dir 2=speed. Any setting other then 0 leaves spindle inoperative. What is the purpose of this setting? Is there any documentation?
> > > > > > > > > > >
> > > > > > > > > > > Thanks,
> > > > > > > > > > >
> > > > > > > > > > > -Steve
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
|
|
Group: DynoMotion |
Message: 7523 |
From: Tom Kerekes |
Date: 5/24/2013 |
Subject: Re: Mach3 servo spindle - no direction change |
Hi Steve,
The extra stuff in Tapio's program is because he sometimes uses the spindle like an axis and does coordinated motion with it and sometimes uses it like a free running spindle. I think it might be better to have special Macros to explicitly switch modes by including or excluding the Spindle axis into the coordinated motion system. But instead he is using spindle on and off to switch the mode automatically.
Regards TK
Group: DynoMotion |
Message: 7524 |
From: Tom Kerekes |
Date: 5/24/2013 |
Subject: Re: Mach3 servo spindle - no direction change |
Hi Steve,
In your Yahoo Group Profile you can select an option to receive emails or not. You have the no email option selected.
Yes the persist.UserData
are global variables that are read/writeable from KFLOP User Threads or the PC vis Console Script Commands.
You can read/write them from Mach3 Basic Scripts as described here:
http://dynomotion.com/Help/Mach3Plugin/Mach3DROs.htm
Regards TK
Group: DynoMotion |
Message: 7532 |
From: Steve |
Date: 5/27/2013 |
Subject: Re: Mach3 servo spindle - no direction change |
I see. My solution to the dual function 4th axis is an external controller and circuit boards to swap the axis/spindle functions.
You can see the product here:
http://www.youtube.com/watch?v=vBLuF_F2_qs
- Steve
--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Steve,
>
> The extra stuff in Tapio's program is because he sometimes uses the spindle like an axis and does coordinated motion with it and sometimes uses it like a free running spindle. I think it might be better to have special Macros to explicitly switch modes by including or excluding the Spindle axis into the coordinated motion system. But instead he is using spindle on and off to switch the mode automatically.
>
> Regards
> TK
>
>
>
> ________________________________
> From: Steve <steve@...>
> To: DynoMotion@yahoogroups.com
> Sent: Friday, May 24, 2013 1:59 PM
> Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
>
>
>
> Â
> Tapio,
>
> Your jog code seems complex. What is the purpose of repeatedly re-defining the the system axis? How is this related to spindle control?
>
> - Steve
>
> --- In DynoMotion@yahoogroups.com, "tapiolarikka" <tapio.larikka@> wrote:
> >
> > Hi Steve!
> >
> > Did you get your spindle working?
> >
> > I noticed today that with lathe mode and CSS Mach3 expects the speed and feed to be on the same line in g-code so I had to remove the "*On" parameter from my below code.
> >
> > Rgds,
> > Tapio
> >
> > --- In DynoMotion@yahoogroups.com, "tapiolarikka" <tapio.larikka@> wrote:
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > Hi Tom/Steve,
> > >
> > > After yet an other day with the spindle I ended up with this:
> > >
> > > #include "KMotionDef.h"
> > >
> > > //Plugin Notifications and defines..
> > > enum { EX_DDA , EX_VMS, EX_COMMAND, EX_SPINON, EX_SPINOFF, EX_SPINSPEED, EX_MOTORTUNED
> > > , EX_SETUP, EX_FEEDHOLD, EX_RUN, EX_ESTOP , EX_CONFIG };
> > >
> > > #define SPINDLE_AXIS 3 // axis set up as Spindle, possibly Step/Dir or Servo
> > > #define FACTOR 226000.0 // Converts fractional pulley speed to counts/sec (may be negative)
> > >
> > > main()
> > > {
> > > int message = persist.UserData[0]; // Mach3 message ID
> > > int Direction = persist.UserData[1]; // Mach3 Spindle Direction
> > > float speed = *(float *)&persist.UserData[2]; // value stored is actually a float
> > > int *On = &persist.UserData[3]; // value stored is actually a float
> > > int DirFactor = 0;
> > >
> > > //if (Direction==0) DirFactor=-1; // change Direcion 0 or 1 to DirFactor -1 or +1
> > > if (Direction==0)
> > > {
> > > DirFactor=1;
> > > }
> > > else if (Direction==1)
> > > {
> > > DirFactor=-1;
> > > }
> > >
> > >
> > > switch (message)
> > > {
> > > case EX_SPINSPEED:
> > > DefineCoordSystem6(0,1,2,-1,-1,-1);
> > > speed = *(float *)&persist.UserData[2]; // value stored is actually a float
> > > printf("Mach3 Notify Message=%d, Direction=%2d, Spindle Set to %f, Run=%3d\n",message,Direction,speed,*On);
> > > Jog(SPINDLE_AXIS,speed*FACTOR*DirFactor*(*On));
> > > while (!CheckDone(SPINDLE_AXIS));
> > > break;
> > >
> > > case EX_SPINON:
> > > *On = TRUE;
> > > DefineCoordSystem6(0,1,2,-1,-1,-1);
> > > printf("Mach3 Notify Message=%d, Direction=%2d, Spindle Set to %f, Run=%3d\n",message,Direction,speed,*On);
> > > Jog(SPINDLE_AXIS,speed*FACTOR*DirFactor*(*On));
> > > while (!CheckDone(SPINDLE_AXIS));
> > > break;
> > >
> > > case EX_SPINOFF:
> > > *On = FALSE;
> > > printf("Mach3 Notify Message=%d, Direction=%2d, Spindle Set to %f, Run=%3d\n",message,Direction,speed,*On);
> > > Jog(SPINDLE_AXIS,0.0);
> > > while(!CheckDone(SPINDLE_AXIS));
> > > DefineCoordSystem6(0,1,2,3,-1,-1);
> > > break;
> > > }
> > >
> > > }
> > >
> > > With this my spindle works well enough:
> > > - spins to both directions
> > > - does not start with manual speed change
> > >
> > > Last remaining wrinkle flaw that I can't iron out is that manual speed change excludes A-axis from coordinate system. If I take the
> > > "DefineCoordSystem6(0,1,2,-1,-1,-1)" out of the "case EX_SPINSPEED:"
> > > the spindle/A-axis does not get excluded from coord system, resulting
> > > in A-axis following error.
> > >
> > > I also found that with above g-code
> > >
> > > S100
> > > M3
> > > F0.2
> > >
> > > works, but
> > >
> > > S100 F0.2
> > > M3
> > >
> > > does not work. Kflop tries to execute the code, but for some reason the spindle/A-axis does not get excluded from coord system, resulting
> > > in A-axis following error.
> > > What's even more odd is that it might work once or twice.
> > >
> > > M3
> > > S100 F0.2
> > >
> > > works, but the feedrate is not handled correctly. This also makes the
> > > spindle start at what ever speed happens to be in DRO.
> > >
> > >
> > > Rgds,
> > > Tapio
> > >
> > >
> > >
> > >
> > > --- In DynoMotion@yahoogroups.com, "tapiolarikka" <tapio.larikka@> wrote:
> > > >
> > > > Hi Tom!
> > > >
> > > > I didn't try your solution yet, I just found it, going through my e-mails. I'll try it first thing tomorrow morning.
> > > >
> > > > I meant that it looks like mach does not actively set the speed/spindle-on to zero at start up.
> > > >
> > > >
> > > > Rgds,
> > > > Tapio
> > > >
> > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > >
> > > > > Hi Tapio,
> > > > >
> > > > > I don't understand what you are saying.ÃÂ Did you try my solution?ÃÂ Does it work for you?ÃÂ Or would you like me to change your file for you?
> > > > >
> > > > > Regards
> > > > > TK
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > ________________________________
> > > > > From: tapiolarikka <tapio.larikka@>
> > > > > To: DynoMotion@yahoogroups.com
> > > > > Sent: Tuesday, May 14, 2013 12:38 PM
> > > > > Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
> > > > >
> > > > >
> > > > >
> > > > > ÃÂ
> > > > > Hi Tom/Steve,
> > > > >
> > > > > I spent half a day tinkering with this same issue, spindle on with speed change after start up.
> > > > > Downside of my today's effort is messed up my working spindlemachjog.c. Only this time I was smart enough to make a copy before I started...
> > > > > As upside I count noticing that for some reason Mach remembers what ever was on the speed dro when shut down, and that first speed message comes with direction=0.
> > > > >
> > > > > Rgds,
> > > > > Tapio
> > > > >
> > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > >
> > > > > > Hi Steve,
> > > > > >
> > > > > > I've been able to duplicate this also.ÃâàNot sure why Mach3 does this.ÃâàI'm thinking your original approach with remembering if the Spindle is on or off is better.ÃâàI've modified the program to do so using persist Variable #3 to remember the previous state.ÃâàSee attached.
> > > > > >
> > > > > > Regards
> > > > > > TK
> > > > > >
> > > > > >
> > > > > >
> > > > > > ________________________________
> > > > > > From: Steve <steve@>
> > > > > > To: DynoMotion@yahoogroups.com
> > > > > > Sent: Tuesday, May 14, 2013 6:56 AM
> > > > > > Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
> > > > > >
> > > > > >
> > > > > >
> > > > > > ÃâÃÂ
> > > > > > The unexpected spindle ON with any speed change input is still present when MACH is first started. Once this initial toggle is passed, the solution works .
> > > > > >
> > > > > > I'm just posting this as a head's up as it is definately something to be aware of and is potentially dangerous.
> > > > > >
> > > > > > I will try putting an M5 in the reset and/or a 'Jog 0' command in the Kflop init and see if either of these will correctly set the system status on startup so that a speed change does not cause the unexpected spindle start.
> > > > > >
> > > > > > - Steve
> > > > > >
> > > > > > --- In DynoMotion@yahoogroups.com, "Steve" <steve@> wrote:
> > > > > > >
> > > > > > > Correction:
> > > > > > >
> > > > > > > Direction -1 is reported by MACH for spindle OFF condition. Sorry for typo. Program is correct.
> > > > > > >
> > > > > > > --- In DynoMotion@yahoogroups.com, "Steve" <steve@> wrote:
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > Tom explained that MACH reports a direction of -1 if the spindle is currently in the ON state, so using that param may be more reliable . . provided MACH does not change the way the param works.
> > > > > > > >
> > > > > > > > A variation of the program that uses this method is available here:
> > > > > > > >
> > > > > > > > http://www.thecubestudio.com/Kflop/SpindleMach3JogSimpsonRev1.htm
> > > > > > > >
> > > > > > > > There are only a couple of line to add to the standard sample program and they are shown in red.
> > > > > > > >
> > > > > > > > - Steve
> > > > > > > >
> > > > > > > >
> > > > > > > > --- In DynoMotion@yahoogroups.com, "Steve" <steve@> wrote:
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > I'm told that my use of the 'new' rich text editor (to highlight the progtram changes) may have caused the error. At the bottom of this post is a link to the program with the lines that I added or changed highlighted in red. I don't know much about Yahoo, but hopefully the link will work.
> > > > > > > > >
> > > > > > > > > The fundamental change is approach is to track the state of the spindle and only do a 'live' speed change iof the spindle is alrady running.
> > > > > > > > >
> > > > > > > > > Spindle ON commands (M3 M4) have separate instruction strings.
> > > > > > > > >
> > > > > > > > > There may be an elegant way to determine the spindle state, but absent a programmers reference, the down and dirty solutionwas to create a volatile variable and update it locally on each stae change. The variable ('SpindleIsRunning')is then used to condition the response to a speed change command.
> > > > > > > > >
> > > > > > > > > Use my example to add the lines to the SpindleMach3Jog.c sample file that comes with the Kflop. Make sure you enter channel/axis number and other params that are correct for your system.
> > > > > > > > >
> > > > > > > > > Rename it to something specific to your setup to keep the original example fiel intact and enter the new file name in the plug-in configuration.
> > > > > > > > >
> > > > > > > > > I have a custom speed 'slider' control on my screen along with buttons for cw, ccw and spindle stop. All are working properly with the modified program in the link above. G-code also works correctly.
> > > > > > > > >
> > > > > > > > > http://www.thecubestudio.com/Kflop/SpindleMach3JogSimpson.htm
> > > > > > > > >
> > > > > > > > > - Steve
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > > > > > >
> > > > > > > > > > Hi Steve,
> > > > > > > > > >
> > > > > > > > > > Please email it to me and I'll upload it.
> > > > > > > > > >
> > > > > > > > > > Thanks
> > > > > > > > > > TK
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > ________________________________
> > > > > > > > > > From: Steve <steve@>
> > > > > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > > > > Sent: Friday, May 3, 2013 12:27 AM
> > > > > > > > > > Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > > > > Tom,
> > > > > > > > > >
> > > > > > > > > > I tried to post the program, but an error message was thrown up saying that the request could not be completed.
> > > > > > > > > >
> > > > > > > > > > =Steve
> > > > > > > > > >
> > > > > > > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > > > > > > >
> > > > > > > > > > > Hi Steve,
> > > > > > > > > > >
> > > > > > > > > > > Could you post your Spindle Program with the bug fixed.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàIt would help solve a problem Tapio is having.
> > > > > > > > > > >
> > > > > > > > > > > Thanks
> > > > > > > > > > > TK
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > ________________________________
> > > > > > > > > > > From: Steve <steve@>
> > > > > > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > > > > > Sent: Tuesday, April 30, 2013 5:08 AM
> > > > > > > > > > > Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > I clarified the work-arounds (aka 'hacks') because you asked about them. They have no effect on the issue in any case, but to answer your question; for testing, everything is box-stock. No mods, work-arounds, custom screens or anything non-standard at all.
> > > > > > > > > > >
> > > > > > > > > > > Only the Kflop device is 'new' to me. I am not a novice and I understand establishing a base-line.
> > > > > > > > > > >
> > > > > > > > > > > I seem to have everything working now including my custom screen buttons that control the spindle. The solution for my application was to make changes to the spindle jog program.
> > > > > > > > > > >
> > > > > > > > > > > What I think is a significant problem in the sample program is the unconditional start of the spindle with a speed change input. If the speed command ('Sxxx')comes befor the Spindle ON command (M4, M3)the net result is an unexpected spindle start which is potentially very dangerous. Just my 2 cents worth. Take it as you like.
> > > > > > > > > > >
> > > > > > > > > > > I have solved this by making the Speed changing 'jog' conditional on the spindle being ON at the time of the speed change. If the spindle is OFF, a speed change updates the parameter but does not start the spindle.
> > > > > > > > > > >
> > > > > > > > > > > Thanks very much for the prompt replies and suggestions.
> > > > > > > > > > >
> > > > > > > > > > > - Steve
> > > > > > > > > > >
> > > > > > > > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > > > > > > > >
> > > > > > > > > > > > Hi Steve,
> > > > > > > > > > > >
> > > > > > > > > > > > You can of course do whatever you wish when you are not trying to troubleshoot problems, but it would be less confusing if the "hacks" were removed when testing.ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàWere the hacks removed when you performed the tests?
> > > > > > > > > > > >
> > > > > > > > > > > > Strange.ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàHaving M5 send no message is the exact behavior when Disable Spindle Relays is checked.ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàYou might double check that.
> > > > > > > > > > > >
> > > > > > > > > > > > Please send the requested files.
> > > > > > > > > > > >
> > > > > > > > > > > > Regards
> > > > > > > > > > > > TK
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > > ________________________________
> > > > > > > > > > > > From: Steve <steve@>
> > > > > > > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > > > > > > Sent: Monday, April 29, 2013 7:38 PM
> > > > > > > > > > > > Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > > ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > > > > > > My M3 and M4 'hacks' are work arounds so that the machine can do useful work. I switched over to a new computer with the Kflop on a machine that has to make parts for a living, so I can only do testing between runs. I will remove the 'hacks' and the patched in dir pin when we resolve the problem with the plug-in.
> > > > > > > > > > > >
> > > > > > > > > > > > FWIW, the new computer is all Intel (except the memory sticks). Intel processor, Intel Motherboard, and Intel SSD. Fresh install Win7 Pro 32 bit. There is nothing on this computer except Windows and MACH3. No antivirus, etc. nothing.
> > > > > > > > > > > >
> > > > > > > > > > > > TESTING RESULTS:
> > > > > > > > > > > >
> > > > > > > > > > > > Typed into MACH's screen 2 manual input line, M3 and M4 result in the following messages on the concole:
> > > > > > > > > > > >
> > > > > > > > > > > > Mach3 Notify Message 3, Direction = 1, Spindle set to xxxxxx
> > > > > > > > > > > > Spindle CCW ON
> > > > > > > > > > > > - and -
> > > > > > > > > > > > Mach3 Notify Message 3, Direction = 0, Spindle set to xxxxxx
> > > > > > > > > > > > Spindle CW ON
> > > > > > > > > > > >
> > > > > > > > > > > > Speed command 'Sxxxx' results in:
> > > > > > > > > > > > Mach3 Notify Message 5, Direction = x, Spindle set to xxxxxx
> > > > > > > > > > > > Spindle Speed Set To xxxxxxx
> > > > > > > > > > > >
> > > > > > > > > > > > In each of the above cases, there is an expected actual result; a direction change or speed change.
> > > > > > > > > > > >
> > > > > > > > > > > > Entry of M5 has no result. No message. ZIP. NADA. and of course no actual result.
> > > > > > > > > > > >
> > > > > > > > > > > > As I surmised, M5 is either not being sent by MACH, or the plug-in is not recognising it.
> > > > > > > > > > > >
> > > > > > > > > > > > = Steve
> > > > > > > > > > > >
> > > > > > > > > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > > > > > > > > >
> > > > > > > > > > > > > Hi Steve,
> > > > > > > > > > > > >
> > > > > > > > > > > > > Thanks.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàHaving a working hardware output pin and having KFLOP Configured to use a Step/Dir Generator to use that pin in the TTL or Open collector modes are two different things is the reason we asked.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàIt also wasn't clear if that was working reliably.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàBut now it is clear.
> > > > > > > > > > > > >
> > > > > > > > > > > > > You of course should not need to change the M3 M4 macros to change the direction.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàSo it would probably be best to remove that and find the real issue.
> > > > > > > > > > > > >
> > > > > > > > > > > > > Please check the Console in the manner I described and also post the requested files.
> > > > > > > > > > > > >
> > > > > > > > > > > > > Regards
> > > > > > > > > > > > > TK
> > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > > ________________________________
> > > > > > > > > > > > > From: Steve <steve@>
> > > > > > > > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > > > > > > > Sent: Monday, April 29, 2013 3:42 PM
> > > > > > > > > > > > > Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
> > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > > ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > > > > > > > I mentioned in the OP that the pin functions normally, but if you need specifics, then yes the pin goes high and low when the box is checked in the digital I/O screen, the jog3 test that you asked for works fine, and as I also said, the direction is changing now, although not reliably. I have already done all of that.
> > > > > > > > > > > > >
> > > > > > > > > > > > > In fact I have a work around wherein I added an output to MACH and puta call in the M3 and M4 macros to toggle the output. I am using that output to change dir on the drive.
> > > > > > > > > > > > > This is a MACH spindle problem and the remaining issue is that the spindle does not turn ON and OFF, which I believe is a different problem from the dir change. I have not been able to figure out a work around for the ON/OFF problem.
> > > > > > > > > > > > >
> > > > > > > > > > > > > I can see that the C programs are printing, but there is never any message on the MACH screen, so I will assume it is printing to the console and take a peek to see if there are any clues and let you know.
> > > > > > > > > > > > >
> > > > > > > > > > > > > - Steve
> > > > > > > > > > > > >
> > > > > > > > > > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Hi Steve,
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Please perform the tests described in the previous email.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàThe idea of testing from the KMotion Console is not to test if the Spindle Runs, but rather if the direction changes properly and reliably.
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > If that works reliably use the KMotion Console to check if the Mach3 messages are getting to KFLOP properly.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàYou will need to report back to us: What you commanded in Mach3, what was printed in the Console, and what
> happened.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàIt would also be helpful to look at the Digital IO Screen to see if your Dir Bit is high or low in each step.
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > If you still can't figure it out attach the Spindle Mach3 C Program, your Init C Program, and your Mach3 XML file (with the standard screen set selected) so we can check them.
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Regards
> > > > > > > > > > > > > > TK
> > > > > > > > > > > > > >
> > > > > > > > > > > > > >
> > > > > > > > > > > > > >
> > > > > > > > > > > > > >
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > ________________________________
> > > > > > > > > > > > > > From: Steve <steve@>
> > > > > > > > > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > > > > > > > > Sent: Monday, April 29, 2013 1:16 PM
> > > > > > > > > > > > > > Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
> > > > > > > > > > > > > >
> > > > > > > > > > > > > >
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > > > > > > > > Tried checked and uncheched. No joy. Tried standard MACH screens; no joy.
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Tried the production version of the plugin; same behavior.
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > ON/OFF commands are either not getting to the plugin, or are in the wrong format perhaps?
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > If it matters, I am running 6 axis plus the spindle. The spindle axis (axis 6) is set up in the init file like all of the other axis.
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > responds to speed changes and sporatically to M3 and M4 . . never responds to M5, which simply contains DoSpinStop()
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > - Steve
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > Hi Steve,
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > I think that the Mach3 option "Disable Spindle Relays" needs to be
> un-checked.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâà'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬ÃâæÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâà'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃâÃ
> ¢ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬ÃâæÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàOtherwise Mach3 doesn't send Spindle off to the Plugin for some reason.
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > Regards
> > > > > > > > > > > > > > > TK
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > ________________________________
> > > > > > > > > > > > > > > From: Steve <steve@>
> > > > > > > > > > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > > > > > > > > > Sent: Monday, April 29, 2013 11:21 AM
> > > > > > > > > > > > > > > Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâà'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬ÃâæÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > > > > > > > > > Note: The spindle DOES run, so the step signal is present, and I am checking for a dir signal on the Spindle DIR wire from the Kflop.
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > I set up a step/dit spindle in the MACH config because the axis are configured within MACH.
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > By removing the spindle from MACHs configuration, the M3 and M4 macros now change direction.
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > However, M5 has no effect and the spindle starts as soon as a speed is entered and there is no way to shut it off except to enter a speed of zero.
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > This is entering commands via MACHs MDI interface.
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > It does not appear that ON/Off are being send or received. The spindle is locked ON at all times and responds only to speed (and now to direction via M3 and M4)
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > Hi Steve,
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > First test the hardware and KFLOP configuration by Jogging the Spindle Axis both directions from the KMotion.exe Console Screen with something like Jog3=10000 and
> Jog3=-10000.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâà'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Å¡Ãâà'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Å¡ÃâæÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâà'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡Ã
> ââÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬ÃâæÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàDoes the
> > > > > axis move both ways?
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > Our Plugin receives a Message (command action code), Direction, and Speed info from Mach3 which it writes into KFLOP before launching the spindle C program in
> KFLOP.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâà'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Å¡Ãâà'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Å¡ÃâæÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâà'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃ
> ¢ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬ÃâæÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàThe Var parameter
> > > > > specifies which 3 consecutive UserData Variables in KFLOP the information will be
> > > > > >
> placed.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâà'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Å¡Ãâà'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Å¡ÃâæÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâà'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃ
> ¢ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬ÃâæÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàSo for example Var is typically configured to be 0, so the 3 pieces of information are placed into Variables 0, 1, and
> > > > >
> 2.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâà'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Å¡Ãâà'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Å¡ÃâæÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâà'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃââÃ
> Æ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬ÃâæÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàThe Plugin
> > > > > > > > > > Configuration and the way the C Program is written where to expect to find the data must
> match.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâà'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Å¡Ãâà'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Å¡ÃâæÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâà'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃ
> ¢ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬ÃâæÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàOtherwise the C Program will use invalid data and things wont work at all.
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > I'm not sure what you mean
> by:ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâà'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Å¡Ãâà'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Å¡ÃâæÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâà'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃââÃ
> Æ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬ÃâæÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡Ãâà"MACH3 set up with Step/Dir
> > > > >
> spindle"ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâà'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Å¡Ãâà'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Å¡ÃâæÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâà'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡Ãâ
> âÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬ÃâæÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàSince KFLOP handles all motion Mach3 doesn't need to know what type of Spindle is connected and
> > > > > >
> how.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâà'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Å¡Ãâà'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Å¡ÃâæÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâà'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡Ãââ
> ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬ÃâæÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàIt just sends logical commands of speed, on, off, direction and the Plugin+KFLOP is expected to make it happen.
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > If your C Program contains diagnostic printout messages you can look at the KMotion Console Screen to see exactly if/what messages, speeds, directions, KFLOP is receiving.
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > If you still have problems post your Mach3 XML file and Spindle C program so we can check it.
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > HTH
> > > > > > > > > > > > > > > > Regards
> > > > > > > > > > > > > > > > TK
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > ________________________________
> > > > > > > > > > > > > > > > From: Steve <steve@>
> > > > > > > > > > > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > > > > > > > > > > Sent: Monday, April 29, 2013 4:09 AM
> > > > > > > > > > > > > > > > Subject: [DynoMotion] Mach3 servo spindle - no direction change
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > >
> ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâà'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Å¡Ãâà'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Å¡ÃâæÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâà'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃââÃÆ'
> Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬ÃâæÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > > > > > > > > > > Using example SpindleMach3Jog.c with MACH3/KFLOP
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > MACH3 set up with Step/Dir spindle
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > Spindle motor runs, but there is no direction change. Testing the Kflop default spindle dir pin (hardware) shows it to be functional, but there is no dir change signal coming off the pin.
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > Documentation and forum search do not have an answer that I can find.
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > The plug-in config has a setting for 0=msg 1=dir 2=speed. Any setting other then 0 leaves spindle inoperative. What is the purpose of this setting? Is there any documentation?
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > Thanks,
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > -Steve
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
|
|
Group: DynoMotion |
Message: 7533 |
From: Steve |
Date: 5/27/2013 |
Subject: Re: Mach3 servo spindle - no direction change |
Thanks for the info. I think I was able to change the e-mail notification setting and I did manage to find and retrieve the sample program that you attached to an earlier post. I will try it out and post back the results.
Right now my scedule is crazy, but I am compiling the info and links you provide so that when I have time to look at programming the Kflop, the resources will be at hand.
- Steve
--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Steve,
>
> In your Yahoo Group Profile you can select an option to receive emails or not. You have the no email option selected.
>
> Yes the persist.UserData are global variables that are read/writeable from KFLOP User Threads or the PC vis Console Script Commands.
>
> You can read/write them from Mach3 Basic Scripts as described here:
>
> http://dynomotion.com/Help/Mach3Plugin/Mach3DROs.htm
>
> Regards
> TK
>
>
>
> ________________________________
> From: Steve <steve@...>
> To: DynoMotion@yahoogroups.com
> Sent: Friday, May 24, 2013 2:14 PM
> Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
>
>
>
> Â
>
> Tom,
>
> Sorry for late reply. I don't know much about Yahoo. I get a ton of email notices from groups that I do not participate in and none from this group . . . odd . . . . so unless I come and peek in I don't know there is acticity on my topics. And I can't find the attachment to your post that you mentioned.
>
> However, I did read thru the posts and I understand that you are using an 'user.persist' variable in place of a volatile. So then I assume that user.persist variables are not read only. Interesting.
>
> Is there then, two way communication with MACH thru these variables?
>
> I believe some fragments of our 'hybrid' solution is contained in some code that Tapio posted so I'll see if I can devine your approach from that.
>
> Incidentally on this topic I did try a variety of methods to try to get MACH to start with the variable set correctly, but to no avail.
>
> - Steve
>
> --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> >
> > Hi Steve,
> >
> > I've been able to duplicate this also.ÃÂ Not sure why Mach3 does this.ÃÂ I'm thinking your original approach with remembering if the Spindle is on or off is better.ÃÂ I've modified the program to do so using persist Variable #3 to remember the previous state.ÃÂ See attached.
> >
> > Regards
> > TK
> >
> >
> >
> > ________________________________
> > From: Steve <steve@>
> > To: DynoMotion@yahoogroups.com
> > Sent: Tuesday, May 14, 2013 6:56 AM
> > Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
> >
> >
> >
> > ÃÂ
> > The unexpected spindle ON with any speed change input is still present when MACH is first started. Once this initial toggle is passed, the solution works .
> >
> > I'm just posting this as a head's up as it is definately something to be aware of and is potentially dangerous.
> >
> > I will try putting an M5 in the reset and/or a 'Jog 0' command in the Kflop init and see if either of these will correctly set the system status on startup so that a speed change does not cause the unexpected spindle start.
> >
> > - Steve
> >
> > --- In DynoMotion@yahoogroups.com, "Steve" <steve@> wrote:
> > >
> > > Correction:
> > >
> > > Direction -1 is reported by MACH for spindle OFF condition. Sorry for typo. Program is correct.
> > >
> > > --- In DynoMotion@yahoogroups.com, "Steve" <steve@> wrote:
> > > >
> > > >
> > > >
> > > >
> > > > Tom explained that MACH reports a direction of -1 if the spindle is currently in the ON state, so using that param may be more reliable . . provided MACH does not change the way the param works.
> > > >
> > > > A variation of the program that uses this method is available here:
> > > >
> > > > http://www.thecubestudio.com/Kflop/SpindleMach3JogSimpsonRev1.htm
> > > >
> > > > There are only a couple of line to add to the standard sample program and they are shown in red.
> > > >
> > > > - Steve
> > > >
> > > >
> > > > --- In DynoMotion@yahoogroups.com, "Steve" <steve@> wrote:
> > > > >
> > > > >
> > > > >
> > > > > I'm told that my use of the 'new' rich text editor (to highlight the progtram changes) may have caused the error. At the bottom of this post is a link to the program with the lines that I added or changed highlighted in red. I don't know much about Yahoo, but hopefully the link will work.
> > > > >
> > > > > The fundamental change is approach is to track the state of the spindle and only do a 'live' speed change iof the spindle is alrady running.
> > > > >
> > > > > Spindle ON commands (M3 M4) have separate instruction strings.
> > > > >
> > > > > There may be an elegant way to determine the spindle state, but absent a programmers reference, the down and dirty solutionwas to create a volatile variable and update it locally on each stae change. The variable ('SpindleIsRunning')is then used to condition the response to a speed change command.
> > > > >
> > > > > Use my example to add the lines to the SpindleMach3Jog.c sample file that comes with the Kflop. Make sure you enter channel/axis number and other params that are correct for your system.
> > > > >
> > > > > Rename it to something specific to your setup to keep the original example fiel intact and enter the new file name in the plug-in configuration.
> > > > >
> > > > > I have a custom speed 'slider' control on my screen along with buttons for cw, ccw and spindle stop. All are working properly with the modified program in the link above. G-code also works correctly.
> > > > >
> > > > > http://www.thecubestudio.com/Kflop/SpindleMach3JogSimpson.htm
> > > > >
> > > > > - Steve
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > >
> > > > > > Hi Steve,
> > > > > >
> > > > > > Please email it to me and I'll upload it.
> > > > > >
> > > > > > Thanks
> > > > > > TK
> > > > > >
> > > > > >
> > > > > >
> > > > > > ________________________________
> > > > > > From: Steve <steve@>
> > > > > > To: DynoMotion@yahoogroups.com
> > > > > > Sent: Friday, May 3, 2013 12:27 AM
> > > > > > Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
> > > > > >
> > > > > >
> > > > > >
> > > > > > ÃâÃÂ
> > > > > > Tom,
> > > > > >
> > > > > > I tried to post the program, but an error message was thrown up saying that the request could not be completed.
> > > > > >
> > > > > > =Steve
> > > > > >
> > > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > > >
> > > > > > > Hi Steve,
> > > > > > >
> > > > > > > Could you post your Spindle Program with the bug fixed.ÃÆ'ââ¬Å¡ÃâàIt would help solve a problem Tapio is having.
> > > > > > >
> > > > > > > Thanks
> > > > > > > TK
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > ________________________________
> > > > > > > From: Steve <steve@>
> > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > Sent: Tuesday, April 30, 2013 5:08 AM
> > > > > > > Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > >
> > > > > > >
> > > > > > > I clarified the work-arounds (aka 'hacks') because you asked about them. They have no effect on the issue in any case, but to answer your question; for testing, everything is box-stock. No mods, work-arounds, custom screens or anything non-standard at all.
> > > > > > >
> > > > > > > Only the Kflop device is 'new' to me. I am not a novice and I understand establishing a base-line.
> > > > > > >
> > > > > > > I seem to have everything working now including my custom screen buttons that control the spindle. The solution for my application was to make changes to the spindle jog program.
> > > > > > >
> > > > > > > What I think is a significant problem in the sample program is the unconditional start of the spindle with a speed change input. If the speed command ('Sxxx')comes befor the Spindle ON command (M4, M3)the net result is an unexpected spindle start which is potentially very dangerous. Just my 2 cents worth. Take it as you like.
> > > > > > >
> > > > > > > I have solved this by making the Speed changing 'jog' conditional on the spindle being ON at the time of the speed change. If the spindle is OFF, a speed change updates the parameter but does not start the spindle.
> > > > > > >
> > > > > > > Thanks very much for the prompt replies and suggestions.
> > > > > > >
> > > > > > > - Steve
> > > > > > >
> > > > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > > > >
> > > > > > > > Hi Steve,
> > > > > > > >
> > > > > > > > You can of course do whatever you wish when you are not trying to troubleshoot problems, but it would be less confusing if the "hacks" were removed when testing.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàWere the hacks removed when you performed the tests?
> > > > > > > >
> > > > > > > > Strange.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàHaving M5 send no message is the exact behavior when Disable Spindle Relays is checked.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàYou might double check that.
> > > > > > > >
> > > > > > > > Please send the requested files.
> > > > > > > >
> > > > > > > > Regards
> > > > > > > > TK
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > ________________________________
> > > > > > > > From: Steve <steve@>
> > > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > > Sent: Monday, April 29, 2013 7:38 PM
> > > > > > > > Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > > My M3 and M4 'hacks' are work arounds so that the machine can do useful work. I switched over to a new computer with the Kflop on a machine that has to make parts for a living, so I can only do testing between runs. I will remove the 'hacks' and the patched in dir pin when we resolve the problem with the plug-in.
> > > > > > > >
> > > > > > > > FWIW, the new computer is all Intel (except the memory sticks). Intel processor, Intel Motherboard, and Intel SSD. Fresh install Win7 Pro 32 bit. There is nothing on this computer except Windows and MACH3. No antivirus, etc. nothing.
> > > > > > > >
> > > > > > > > TESTING RESULTS:
> > > > > > > >
> > > > > > > > Typed into MACH's screen 2 manual input line, M3 and M4 result in the following messages on the concole:
> > > > > > > >
> > > > > > > > Mach3 Notify Message 3, Direction = 1, Spindle set to xxxxxx
> > > > > > > > Spindle CCW ON
> > > > > > > > - and -
> > > > > > > > Mach3 Notify Message 3, Direction = 0, Spindle set to xxxxxx
> > > > > > > > Spindle CW ON
> > > > > > > >
> > > > > > > > Speed command 'Sxxxx' results in:
> > > > > > > > Mach3 Notify Message 5, Direction = x, Spindle set to xxxxxx
> > > > > > > > Spindle Speed Set To xxxxxxx
> > > > > > > >
> > > > > > > > In each of the above cases, there is an expected actual result; a direction change or speed change.
> > > > > > > >
> > > > > > > > Entry of M5 has no result. No message. ZIP. NADA. and of course no actual result.
> > > > > > > >
> > > > > > > > As I surmised, M5 is either not being sent by MACH, or the plug-in is not recognising it.
> > > > > > > >
> > > > > > > > = Steve
> > > > > > > >
> > > > > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > > > > >
> > > > > > > > > Hi Steve,
> > > > > > > > >
> > > > > > > > > Thanks.ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàHaving a working hardware output pin and having KFLOP Configured to use a Step/Dir Generator to use that pin in the TTL or Open collector modes are two different things is the reason we asked.ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàIt also wasn't clear if that was working reliably.ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàBut now it is clear.
> > > > > > > > >
> > > > > > > > > You of course should not need to change the M3 M4 macros to change the direction.ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàSo it would probably be best to remove that and find the real issue.
> > > > > > > > >
> > > > > > > > > Please check the Console in the manner I described and also post the requested files.
> > > > > > > > >
> > > > > > > > > Regards
> > > > > > > > > TK
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > ________________________________
> > > > > > > > > From: Steve <steve@>
> > > > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > > > Sent: Monday, April 29, 2013 3:42 PM
> > > > > > > > > Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > > > I mentioned in the OP that the pin functions normally, but if you need specifics, then yes the pin goes high and low when the box is checked in the digital I/O screen, the jog3 test that you asked for works fine, and as I also said, the direction is changing now, although not reliably. I have already done all of that.
> > > > > > > > >
> > > > > > > > > In fact I have a work around wherein I added an output to MACH and puta call in the M3 and M4 macros to toggle the output. I am using that output to change dir on the drive.
> > > > > > > > > This is a MACH spindle problem and the remaining issue is that the spindle does not turn ON and OFF, which I believe is a different problem from the dir change. I have not been able to figure out a work around for the ON/OFF problem.
> > > > > > > > >
> > > > > > > > > I can see that the C programs are printing, but there is never any message on the MACH screen, so I will assume it is printing to the console and take a peek to see if there are any clues and let you know.
> > > > > > > > >
> > > > > > > > > - Steve
> > > > > > > > >
> > > > > > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > > > > > >
> > > > > > > > > > Hi Steve,
> > > > > > > > > >
> > > > > > > > > > Please perform the tests described in the previous email.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàThe idea of testing from the KMotion Console is not to test if the Spindle Runs, but rather if the direction changes properly and reliably.
> > > > > > > > > >
> > > > > > > > > > If that works reliably use the KMotion Console to check if the Mach3 messages are getting to KFLOP properly.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàYou will need to report back to us: What you commanded in Mach3, what was printed in the Console, and what happened.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàIt would also be helpful to look at the Digital IO Screen to see if your Dir Bit is high or low in each step.
> > > > > > > > > >
> > > > > > > > > > If you still can't figure it out attach the Spindle Mach3 C Program, your Init C Program, and your Mach3 XML file (with the standard screen set selected) so we can check them.
> > > > > > > > > >
> > > > > > > > > > Regards
> > > > > > > > > > TK
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > ________________________________
> > > > > > > > > > From: Steve <steve@>
> > > > > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > > > > Sent: Monday, April 29, 2013 1:16 PM
> > > > > > > > > > Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > > > > Tried checked and uncheched. No joy. Tried standard MACH screens; no joy.
> > > > > > > > > >
> > > > > > > > > > Tried the production version of the plugin; same behavior.
> > > > > > > > > >
> > > > > > > > > > ON/OFF commands are either not getting to the plugin, or are in the wrong format perhaps?
> > > > > > > > > >
> > > > > > > > > > If it matters, I am running 6 axis plus the spindle. The spindle axis (axis 6) is set up in the init file like all of the other axis.
> > > > > > > > > >
> > > > > > > > > > responds to speed changes and sporatically to M3 and M4 . . never responds to M5, which simply contains DoSpinStop()
> > > > > > > > > >
> > > > > > > > > > - Steve
> > > > > > > > > >
> > > > > > > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > > > > > > >
> > > > > > > > > > > Hi Steve,
> > > > > > > > > > >
> > > > > > > > > > > I think that the Mach3 option "Disable Spindle Relays" needs to be un-checked.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàOtherwise Mach3 doesn't send Spindle off to the Plugin for some reason.
> > > > > > > > > > >
> > > > > > > > > > > Regards
> > > > > > > > > > > TK
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > ________________________________
> > > > > > > > > > > From: Steve <steve@>
> > > > > > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > > > > > Sent: Monday, April 29, 2013 11:21 AM
> > > > > > > > > > > Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > > > > > Note: The spindle DOES run, so the step signal is present, and I am checking for a dir signal on the Spindle DIR wire from the Kflop.
> > > > > > > > > > >
> > > > > > > > > > > I set up a step/dit spindle in the MACH config because the axis are configured within MACH.
> > > > > > > > > > >
> > > > > > > > > > > By removing the spindle from MACHs configuration, the M3 and M4 macros now change direction.
> > > > > > > > > > >
> > > > > > > > > > > However, M5 has no effect and the spindle starts as soon as a speed is entered and there is no way to shut it off except to enter a speed of zero.
> > > > > > > > > > >
> > > > > > > > > > > This is entering commands via MACHs MDI interface.
> > > > > > > > > > >
> > > > > > > > > > > It does not appear that ON/Off are being send or received. The spindle is locked ON at all times and responds only to speed (and now to direction via M3 and M4)
> > > > > > > > > > >
> > > > > > > > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > > > > > > > >
> > > > > > > > > > > > Hi Steve,
> > > > > > > > > > > >
> > > > > > > > > > > > First test the hardware and KFLOP configuration by Jogging the Spindle Axis both directions from the KMotion.exe Console Screen with something like Jog3=10000 and Jog3=-10000.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâà'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬ÃâæÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàDoes the
> axis move both ways?
> > > > > > > > > > > >
> > > > > > > > > > > > Our Plugin receives a Message (command action code), Direction, and Speed info from Mach3 which it writes into KFLOP before launching the spindle C program in KFLOP.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâà'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬ÃâæÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàThe Var parameter
> specifies which 3 consecutive UserData Variables in KFLOP the information will be
> > placed.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâà'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬ÃâæÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàSo for example Var is typically configured to be 0, so the 3 pieces of information are placed into Variables 0, 1, and
> 2.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâà'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬ÃâæÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàThe Plugin
> > > > > > Configuration and the way the C Program is written where to expect to find the data must match.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâà'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬ÃâæÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàOtherwise the C Program will use invalid data and things wont work at all.
> > > > > > > > > > > >
> > > > > > > > > > > > I'm not sure what you mean by:ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâà'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬ÃâæÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡Ãâà"MACH3 set up with Step/Dir
> spindle"ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâà'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬ÃâæÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàSince KFLOP handles all motion Mach3 doesn't need to know what type of Spindle is connected and
> > how.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâà'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬ÃâæÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàIt just sends logical commands of speed, on, off, direction and the Plugin+KFLOP is expected to make it happen.
> > > > > > > > > > > >
> > > > > > > > > > > > If your C Program contains diagnostic printout messages you can look at the KMotion Console Screen to see exactly if/what messages, speeds, directions, KFLOP is receiving.
> > > > > > > > > > > >
> > > > > > > > > > > > If you still have problems post your Mach3 XML file and Spindle C program so we can check it.
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > > HTH
> > > > > > > > > > > > Regards
> > > > > > > > > > > > TK
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > > ________________________________
> > > > > > > > > > > > From: Steve <steve@>
> > > > > > > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > > > > > > Sent: Monday, April 29, 2013 4:09 AM
> > > > > > > > > > > > Subject: [DynoMotion] Mach3 servo spindle - no direction change
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > > ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâà'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬ÃâæÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > > > > > > Using example SpindleMach3Jog.c with MACH3/KFLOP
> > > > > > > > > > > >
> > > > > > > > > > > > MACH3 set up with Step/Dir spindle
> > > > > > > > > > > >
> > > > > > > > > > > > Spindle motor runs, but there is no direction change. Testing the Kflop default spindle dir pin (hardware) shows it to be functional, but there is no dir change signal coming off the pin.
> > > > > > > > > > > >
> > > > > > > > > > > > Documentation and forum search do not have an answer that I can find.
> > > > > > > > > > > >
> > > > > > > > > > > > The plug-in config has a setting for 0=msg 1=dir 2=speed. Any setting other then 0 leaves spindle inoperative. What is the purpose of this setting? Is there any documentation?
> > > > > > > > > > > >
> > > > > > > > > > > > Thanks,
> > > > > > > > > > > >
> > > > > > > > > > > > -Steve
> > > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
|
|
Group: DynoMotion |
Message: 7548 |
From: tapiolarikka |
Date: 5/29/2013 |
Subject: Re: Mach3 servo spindle - no direction change |
Hi Tom!
Yes my general idea was to have the A-axis and it jumps to spindle mode when told by M3/M4. otherwise it stays button joggable and available for coordinated motion. Also I avoid conflicts due to forgetting extra macro calls.
What would be the advantages in using separate macros for this?
I figured I'll try and get rid of the "spindle start from speed dro after mach3 booting"-issue by adding M5 to Mach initialization string.
Idea was to get mach to set the spindle direction to -1 from the start.
In parallel port mode Mach reports
"mach3 initialization macro called on reset" but in kflop mode I don't get such notification.
how do I execute M5 from my init file or should this be done by the plugin?
Rgds,
Tapio
--- In DynoMotion@yahoogroups.com, "Steve" <steve@...> wrote:
>
> Thanks for the info. I think I was able to change the e-mail notification setting and I did manage to find and retrieve the sample program that you attached to an earlier post. I will try it out and post back the results.
>
> Right now my scedule is crazy, but I am compiling the info and links you provide so that when I have time to look at programming the Kflop, the resources will be at hand.
>
> - Steve
>
>
>
>
> --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> >
> > Hi Steve,
> >
> > In your Yahoo Group Profile you can select an option to receive emails or not. You have the no email option selected.
> >
> > Yes the persist.UserData are global variables that are read/writeable from KFLOP User Threads or the PC vis Console Script Commands.
> >
> > You can read/write them from Mach3 Basic Scripts as described here:
> >
> > http://dynomotion.com/Help/Mach3Plugin/Mach3DROs.htm
> >
> > Regards
> > TK
> >
> >
> >
> > ________________________________
> > From: Steve <steve@>
> > To: DynoMotion@yahoogroups.com
> > Sent: Friday, May 24, 2013 2:14 PM
> > Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
> >
> >
> >
> > Â
> >
> > Tom,
> >
> > Sorry for late reply. I don't know much about Yahoo. I get a ton of email notices from groups that I do not participate in and none from this group . . . odd . . . . so unless I come and peek in I don't know there is acticity on my topics. And I can't find the attachment to your post that you mentioned.
> >
> > However, I did read thru the posts and I understand that you are using an 'user.persist' variable in place of a volatile. So then I assume that user.persist variables are not read only. Interesting.
> >
> > Is there then, two way communication with MACH thru these variables?
> >
> > I believe some fragments of our 'hybrid' solution is contained in some code that Tapio posted so I'll see if I can devine your approach from that.
> >
> > Incidentally on this topic I did try a variety of methods to try to get MACH to start with the variable set correctly, but to no avail.
> >
> > - Steve
> >
> > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > >
> > > Hi Steve,
> > >
> > > I've been able to duplicate this also.ÃÂ Not sure why Mach3 does this.ÃÂ I'm thinking your original approach with remembering if the Spindle is on or off is better.ÃÂ I've modified the program to do so using persist Variable #3 to remember the previous state.ÃÂ See attached.
> > >
> > > Regards
> > > TK
> > >
> > >
> > >
> > > ________________________________
> > > From: Steve <steve@>
> > > To: DynoMotion@yahoogroups.com
> > > Sent: Tuesday, May 14, 2013 6:56 AM
> > > Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
> > >
> > >
> > >
> > > ÃÂ
> > > The unexpected spindle ON with any speed change input is still present when MACH is first started. Once this initial toggle is passed, the solution works .
> > >
> > > I'm just posting this as a head's up as it is definately something to be aware of and is potentially dangerous.
> > >
> > > I will try putting an M5 in the reset and/or a 'Jog 0' command in the Kflop init and see if either of these will correctly set the system status on startup so that a speed change does not cause the unexpected spindle start.
> > >
> > > - Steve
> > >
> > > --- In DynoMotion@yahoogroups.com, "Steve" <steve@> wrote:
> > > >
> > > > Correction:
> > > >
> > > > Direction -1 is reported by MACH for spindle OFF condition. Sorry for typo. Program is correct.
> > > >
> > > > --- In DynoMotion@yahoogroups.com, "Steve" <steve@> wrote:
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > Tom explained that MACH reports a direction of -1 if the spindle is currently in the ON state, so using that param may be more reliable . . provided MACH does not change the way the param works.
> > > > >
> > > > > A variation of the program that uses this method is available here:
> > > > >
> > > > > http://www.thecubestudio.com/Kflop/SpindleMach3JogSimpsonRev1.htm
> > > > >
> > > > > There are only a couple of line to add to the standard sample program and they are shown in red.
> > > > >
> > > > > - Steve
> > > > >
> > > > >
> > > > > --- In DynoMotion@yahoogroups.com, "Steve" <steve@> wrote:
> > > > > >
> > > > > >
> > > > > >
> > > > > > I'm told that my use of the 'new' rich text editor (to highlight the progtram changes) may have caused the error. At the bottom of this post is a link to the program with the lines that I added or changed highlighted in red. I don't know much about Yahoo, but hopefully the link will work.
> > > > > >
> > > > > > The fundamental change is approach is to track the state of the spindle and only do a 'live' speed change iof the spindle is alrady running.
> > > > > >
> > > > > > Spindle ON commands (M3 M4) have separate instruction strings.
> > > > > >
> > > > > > There may be an elegant way to determine the spindle state, but absent a programmers reference, the down and dirty solutionwas to create a volatile variable and update it locally on each stae change. The variable ('SpindleIsRunning')is then used to condition the response to a speed change command.
> > > > > >
> > > > > > Use my example to add the lines to the SpindleMach3Jog.c sample file that comes with the Kflop. Make sure you enter channel/axis number and other params that are correct for your system.
> > > > > >
> > > > > > Rename it to something specific to your setup to keep the original example fiel intact and enter the new file name in the plug-in configuration.
> > > > > >
> > > > > > I have a custom speed 'slider' control on my screen along with buttons for cw, ccw and spindle stop. All are working properly with the modified program in the link above. G-code also works correctly.
> > > > > >
> > > > > > http://www.thecubestudio.com/Kflop/SpindleMach3JogSimpson.htm
> > > > > >
> > > > > > - Steve
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > > >
> > > > > > > Hi Steve,
> > > > > > >
> > > > > > > Please email it to me and I'll upload it.
> > > > > > >
> > > > > > > Thanks
> > > > > > > TK
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > ________________________________
> > > > > > > From: Steve <steve@>
> > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > Sent: Friday, May 3, 2013 12:27 AM
> > > > > > > Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > ÃâÃÂ
> > > > > > > Tom,
> > > > > > >
> > > > > > > I tried to post the program, but an error message was thrown up saying that the request could not be completed.
> > > > > > >
> > > > > > > =Steve
> > > > > > >
> > > > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > > > >
> > > > > > > > Hi Steve,
> > > > > > > >
> > > > > > > > Could you post your Spindle Program with the bug fixed.ÃÆ'ââ¬Å¡ÃâàIt would help solve a problem Tapio is having.
> > > > > > > >
> > > > > > > > Thanks
> > > > > > > > TK
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > ________________________________
> > > > > > > > From: Steve <steve@>
> > > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > > Sent: Tuesday, April 30, 2013 5:08 AM
> > > > > > > > Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > >
> > > > > > > >
> > > > > > > > I clarified the work-arounds (aka 'hacks') because you asked about them. They have no effect on the issue in any case, but to answer your question; for testing, everything is box-stock. No mods, work-arounds, custom screens or anything non-standard at all.
> > > > > > > >
> > > > > > > > Only the Kflop device is 'new' to me. I am not a novice and I understand establishing a base-line.
> > > > > > > >
> > > > > > > > I seem to have everything working now including my custom screen buttons that control the spindle. The solution for my application was to make changes to the spindle jog program.
> > > > > > > >
> > > > > > > > What I think is a significant problem in the sample program is the unconditional start of the spindle with a speed change input. If the speed command ('Sxxx')comes befor the Spindle ON command (M4, M3)the net result is an unexpected spindle start which is potentially very dangerous. Just my 2 cents worth. Take it as you like.
> > > > > > > >
> > > > > > > > I have solved this by making the Speed changing 'jog' conditional on the spindle being ON at the time of the speed change. If the spindle is OFF, a speed change updates the parameter but does not start the spindle.
> > > > > > > >
> > > > > > > > Thanks very much for the prompt replies and suggestions.
> > > > > > > >
> > > > > > > > - Steve
> > > > > > > >
> > > > > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > > > > >
> > > > > > > > > Hi Steve,
> > > > > > > > >
> > > > > > > > > You can of course do whatever you wish when you are not trying to troubleshoot problems, but it would be less confusing if the "hacks" were removed when testing.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàWere the hacks removed when you performed the tests?
> > > > > > > > >
> > > > > > > > > Strange.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàHaving M5 send no message is the exact behavior when Disable Spindle Relays is checked.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàYou might double check that.
> > > > > > > > >
> > > > > > > > > Please send the requested files.
> > > > > > > > >
> > > > > > > > > Regards
> > > > > > > > > TK
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > ________________________________
> > > > > > > > > From: Steve <steve@>
> > > > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > > > Sent: Monday, April 29, 2013 7:38 PM
> > > > > > > > > Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > > > My M3 and M4 'hacks' are work arounds so that the machine can do useful work. I switched over to a new computer with the Kflop on a machine that has to make parts for a living, so I can only do testing between runs. I will remove the 'hacks' and the patched in dir pin when we resolve the problem with the plug-in.
> > > > > > > > >
> > > > > > > > > FWIW, the new computer is all Intel (except the memory sticks). Intel processor, Intel Motherboard, and Intel SSD. Fresh install Win7 Pro 32 bit. There is nothing on this computer except Windows and MACH3. No antivirus, etc. nothing.
> > > > > > > > >
> > > > > > > > > TESTING RESULTS:
> > > > > > > > >
> > > > > > > > > Typed into MACH's screen 2 manual input line, M3 and M4 result in the following messages on the concole:
> > > > > > > > >
> > > > > > > > > Mach3 Notify Message 3, Direction = 1, Spindle set to xxxxxx
> > > > > > > > > Spindle CCW ON
> > > > > > > > > - and -
> > > > > > > > > Mach3 Notify Message 3, Direction = 0, Spindle set to xxxxxx
> > > > > > > > > Spindle CW ON
> > > > > > > > >
> > > > > > > > > Speed command 'Sxxxx' results in:
> > > > > > > > > Mach3 Notify Message 5, Direction = x, Spindle set to xxxxxx
> > > > > > > > > Spindle Speed Set To xxxxxxx
> > > > > > > > >
> > > > > > > > > In each of the above cases, there is an expected actual result; a direction change or speed change.
> > > > > > > > >
> > > > > > > > > Entry of M5 has no result. No message. ZIP. NADA. and of course no actual result.
> > > > > > > > >
> > > > > > > > > As I surmised, M5 is either not being sent by MACH, or the plug-in is not recognising it.
> > > > > > > > >
> > > > > > > > > = Steve
> > > > > > > > >
> > > > > > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > > > > > >
> > > > > > > > > > Hi Steve,
> > > > > > > > > >
> > > > > > > > > > Thanks.ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàHaving a working hardware output pin and having KFLOP Configured to use a Step/Dir Generator to use that pin in the TTL or Open collector modes are two different things is the reason we asked.ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàIt also wasn't clear if that was working reliably.ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàBut now it is clear.
> > > > > > > > > >
> > > > > > > > > > You of course should not need to change the M3 M4 macros to change the direction.ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàSo it would probably be best to remove that and find the real issue.
> > > > > > > > > >
> > > > > > > > > > Please check the Console in the manner I described and also post the requested files.
> > > > > > > > > >
> > > > > > > > > > Regards
> > > > > > > > > > TK
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > ________________________________
> > > > > > > > > > From: Steve <steve@>
> > > > > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > > > > Sent: Monday, April 29, 2013 3:42 PM
> > > > > > > > > > Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > > > > I mentioned in the OP that the pin functions normally, but if you need specifics, then yes the pin goes high and low when the box is checked in the digital I/O screen, the jog3 test that you asked for works fine, and as I also said, the direction is changing now, although not reliably. I have already done all of that.
> > > > > > > > > >
> > > > > > > > > > In fact I have a work around wherein I added an output to MACH and puta call in the M3 and M4 macros to toggle the output. I am using that output to change dir on the drive.
> > > > > > > > > > This is a MACH spindle problem and the remaining issue is that the spindle does not turn ON and OFF, which I believe is a different problem from the dir change. I have not been able to figure out a work around for the ON/OFF problem.
> > > > > > > > > >
> > > > > > > > > > I can see that the C programs are printing, but there is never any message on the MACH screen, so I will assume it is printing to the console and take a peek to see if there are any clues and let you know.
> > > > > > > > > >
> > > > > > > > > > - Steve
> > > > > > > > > >
> > > > > > > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > > > > > > >
> > > > > > > > > > > Hi Steve,
> > > > > > > > > > >
> > > > > > > > > > > Please perform the tests described in the previous email.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàThe idea of testing from the KMotion Console is not to test if the Spindle Runs, but rather if the direction changes properly and reliably.
> > > > > > > > > > >
> > > > > > > > > > > If that works reliably use the KMotion Console to check if the Mach3 messages are getting to KFLOP properly.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàYou will need to report back to us: What you commanded in Mach3, what was printed in the Console, and what happened.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàIt would also be helpful to look at the Digital IO Screen to see if your Dir Bit is high or low in each step.
> > > > > > > > > > >
> > > > > > > > > > > If you still can't figure it out attach the Spindle Mach3 C Program, your Init C Program, and your Mach3 XML file (with the standard screen set selected) so we can check them.
> > > > > > > > > > >
> > > > > > > > > > > Regards
> > > > > > > > > > > TK
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > ________________________________
> > > > > > > > > > > From: Steve <steve@>
> > > > > > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > > > > > Sent: Monday, April 29, 2013 1:16 PM
> > > > > > > > > > > Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > > > > > Tried checked and uncheched. No joy. Tried standard MACH screens; no joy.
> > > > > > > > > > >
> > > > > > > > > > > Tried the production version of the plugin; same behavior.
> > > > > > > > > > >
> > > > > > > > > > > ON/OFF commands are either not getting to the plugin, or are in the wrong format perhaps?
> > > > > > > > > > >
> > > > > > > > > > > If it matters, I am running 6 axis plus the spindle. The spindle axis (axis 6) is set up in the init file like all of the other axis.
> > > > > > > > > > >
> > > > > > > > > > > responds to speed changes and sporatically to M3 and M4 . . never responds to M5, which simply contains DoSpinStop()
> > > > > > > > > > >
> > > > > > > > > > > - Steve
> > > > > > > > > > >
> > > > > > > > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > > > > > > > >
> > > > > > > > > > > > Hi Steve,
> > > > > > > > > > > >
> > > > > > > > > > > > I think that the Mach3 option "Disable Spindle Relays" needs to be un-checked.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàOtherwise Mach3 doesn't send Spindle off to the Plugin for some reason.
> > > > > > > > > > > >
> > > > > > > > > > > > Regards
> > > > > > > > > > > > TK
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > > ________________________________
> > > > > > > > > > > > From: Steve <steve@>
> > > > > > > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > > > > > > Sent: Monday, April 29, 2013 11:21 AM
> > > > > > > > > > > > Subject: [DynoMotion] Re: Mach3 servo spindle - no direction change
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > > ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > > > > > > Note: The spindle DOES run, so the step signal is present, and I am checking for a dir signal on the Spindle DIR wire from the Kflop.
> > > > > > > > > > > >
> > > > > > > > > > > > I set up a step/dit spindle in the MACH config because the axis are configured within MACH.
> > > > > > > > > > > >
> > > > > > > > > > > > By removing the spindle from MACHs configuration, the M3 and M4 macros now change direction.
> > > > > > > > > > > >
> > > > > > > > > > > > However, M5 has no effect and the spindle starts as soon as a speed is entered and there is no way to shut it off except to enter a speed of zero.
> > > > > > > > > > > >
> > > > > > > > > > > > This is entering commands via MACHs MDI interface.
> > > > > > > > > > > >
> > > > > > > > > > > > It does not appear that ON/Off are being send or received. The spindle is locked ON at all times and responds only to speed (and now to direction via M3 and M4)
> > > > > > > > > > > >
> > > > > > > > > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > > > > > > > > >
> > > > > > > > > > > > > Hi Steve,
> > > > > > > > > > > > >
> > > > > > > > > > > > > First test the hardware and KFLOP configuration by Jogging the Spindle Axis both directions from the KMotion.exe Console Screen with something like Jog3=10000 and Jog3=-10000.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâà'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬ÃâæÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàDoes the
> > axis move both ways?
> > > > > > > > > > > > >
> > > > > > > > > > > > > Our Plugin receives a Message (command action code), Direction, and Speed info from Mach3 which it writes into KFLOP before launching the spindle C program in KFLOP.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâà'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬ÃâæÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàThe Var parameter
> > specifies which 3 consecutive UserData Variables in KFLOP the information will be
> > > placed.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâà'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬ÃâæÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàSo for example Var is typically configured to be 0, so the 3 pieces of information are placed into Variables 0, 1, and
> > 2.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâà'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬ÃâæÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàThe Plugin
> > > > > > > Configuration and the way the C Program is written where to expect to find the data must match.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâà'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬ÃâæÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàOtherwise the C Program will use invalid data and things wont work at all.
> > > > > > > > > > > > >
> > > > > > > > > > > > > I'm not sure what you mean by:ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâà'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬ÃâæÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡Ãâà"MACH3 set up with Step/Dir
> > spindle"ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâà'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬ÃâæÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàSince KFLOP handles all motion Mach3 doesn't need to know what type of Spindle is connected and
> > > how.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâà'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬ÃâæÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàIt just sends logical commands of speed, on, off, direction and the Plugin+KFLOP is expected to make it happen.
> > > > > > > > > > > > >
> > > > > > > > > > > > > If your C Program contains diagnostic printout messages you can look at the KMotion Console Screen to see exactly if/what messages, speeds, directions, KFLOP is receiving.
> > > > > > > > > > > > >
> > > > > > > > > > > > > If you still have problems post your Mach3 XML file and Spindle C program so we can check it.
> > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > > HTH
> > > > > > > > > > > > > Regards
> > > > > > > > > > > > > TK
> > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > > ________________________________
> > > > > > > > > > > > > From: Steve <steve@>
> > > > > > > > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > > > > > > > Sent: Monday, April 29, 2013 4:09 AM
> > > > > > > > > > > > > Subject: [DynoMotion] Mach3 servo spindle - no direction change
> > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > > ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâà'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬ÃâæÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'âââ¬Ã 'ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Å¡ÃââÃÆ'Ã'ÃââÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'ââ¬Å¡ÃâìÃÆ'Ã'âââ¬Ã¦ÃÆ'ââ¬Å¡ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > > > > > > > Using example SpindleMach3Jog.c with MACH3/KFLOP
> > > > > > > > > > > > >
> > > > > > > > > > > > > MACH3 set up with Step/Dir spindle
> > > > > > > > > > > > >
> > > > > > > > > > > > > Spindle motor runs, but there is no direction change. Testing the Kflop default spindle dir pin (hardware) shows it to be functional, but there is no dir change signal coming off the pin.
> > > > > > > > > > > > >
> > > > > > > > > > > > > Documentation and forum search do not have an answer that I can find.
> > > > > > > > > > > > >
> > > > > > > > > > > > > The plug-in config has a setting for 0=msg 1=dir 2=speed. Any setting other then 0 leaves spindle inoperative. What is the purpose of this setting? Is there any documentation?
> > > > > > > > > > > > >
> > > > > > > > > > > > > Thanks,
> > > > > > > > > > > > >
> > > > > > > > > > > > > -Steve
> > > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
|
|
| | | | | | | | | | | | | | | | | | | | | |